Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
AnswerRe: File download in Class Library Pin
Dave Kreskowiak11-Mar-13 19:05
mveDave Kreskowiak11-Mar-13 19:05 
GeneralRe: File download in Class Library Pin
Member 961703711-Mar-13 19:35
Member 961703711-Mar-13 19:35 
GeneralRe: File download in Class Library Pin
Richard MacCutchan11-Mar-13 22:56
mveRichard MacCutchan11-Mar-13 22:56 
QuestionSimple helper class for DateTime? Pin
Goaty6510911-Mar-13 12:59
Goaty6510911-Mar-13 12:59 
AnswerRe: Simple helper class for DateTime? Pin
Garth J Lancaster11-Mar-13 13:13
professionalGarth J Lancaster11-Mar-13 13:13 
AnswerRe: Simple helper class for DateTime? Pin
Dave Kreskowiak11-Mar-13 13:22
mveDave Kreskowiak11-Mar-13 13:22 
GeneralRe: Simple helper class for DateTime? Pin
Goaty6510911-Mar-13 13:41
Goaty6510911-Mar-13 13:41 
AnswerRe: Simple helper class for DateTime? Pin
DaveyM6911-Mar-13 13:41
professionalDaveyM6911-Mar-13 13:41 
If you want to use Parameters without creating an instance then the methods/properties/fields you are exposing need to be static. If they are all static, then the class should be static too.

You will have a problem with time if you make it static as it will only be set the first time you call it.

This will fix your problems:
C#
public static class Paramaters
{
    public const string MonthDayFormat = "MM/dd";
    public static DateTime Time
    {
        get { return DateTime.Now; }
    }
}

C#
textBox1.Text = Paramaters.Time.ToString(Paramaters.MonthDayFormat);

Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: Simple helper class for DateTime? Pin
Goaty6510911-Mar-13 13:50
Goaty6510911-Mar-13 13:50 
GeneralRe: Simple helper class for DateTime? Pin
DaveyM6911-Mar-13 13:52
professionalDaveyM6911-Mar-13 13:52 
GeneralRe: Simple helper class for DateTime? Pin
Goaty6510911-Mar-13 13:59
Goaty6510911-Mar-13 13:59 
GeneralRe: Simple helper class for DateTime? Pin
DaveyM6911-Mar-13 14:04
professionalDaveyM6911-Mar-13 14:04 
AnswerRe: Simple helper class for DateTime? Pin
V.11-Mar-13 23:11
professionalV.11-Mar-13 23:11 
QuestionWCF Method that takes an object as its parameter Pin
David Chen11-Mar-13 11:47
David Chen11-Mar-13 11:47 
Questionupdating MS database using c#.net Pin
Eng.almasrouhi11-Mar-13 10:12
Eng.almasrouhi11-Mar-13 10:12 
AnswerRe: updating MS database using c#.net Pin
jschell11-Mar-13 10:57
jschell11-Mar-13 10:57 
GeneralRe: updating MS database using c#.net Pin
Eng.almasrouhi11-Mar-13 11:26
Eng.almasrouhi11-Mar-13 11:26 
GeneralRe: updating MS database using c#.net Pin
NotPolitcallyCorrect11-Mar-13 11:45
NotPolitcallyCorrect11-Mar-13 11:45 
GeneralRe: updating MS database using c#.net Pin
Eng.almasrouhi11-Mar-13 12:09
Eng.almasrouhi11-Mar-13 12:09 
GeneralRe: updating MS database using c#.net Pin
NotPolitcallyCorrect11-Mar-13 14:07
NotPolitcallyCorrect11-Mar-13 14:07 
JokeRe: updating MS database using c#.net Pin
Eddy Vluggen11-Mar-13 11:48
professionalEddy Vluggen11-Mar-13 11:48 
GeneralRe: updating MS database using c#.net Pin
Eng.almasrouhi11-Mar-13 12:13
Eng.almasrouhi11-Mar-13 12:13 
AnswerRe: updating MS database using c#.net Pin
jschell12-Mar-13 9:21
jschell12-Mar-13 9:21 
Questionerror with update query Pin
User349011-Mar-13 9:23
User349011-Mar-13 9:23 
AnswerRe: error with update query Pin
vanikanc11-Mar-13 9:31
vanikanc11-Mar-13 9:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.