Click here to Skip to main content
15,892,517 members
Home / Discussions / C#
   

C#

 
QuestionHOW I PROVIDE SECURITY OF MY DLL FILE FROM END USER Pin
seema jadhav11-Mar-13 21:09
seema jadhav11-Mar-13 21:09 
SuggestionRe: HOW I PROVIDE SECURITY OF MY DLL FILE FROM END USER Pin
Richard MacCutchan11-Mar-13 22:51
mveRichard MacCutchan11-Mar-13 22:51 
AnswerRe: HOW I PROVIDE SECURITY OF MY DLL FILE FROM END USER Pin
Pete O'Hanlon11-Mar-13 23:15
mvePete O'Hanlon11-Mar-13 23:15 
AnswerRe: HOW I PROVIDE SECURITY OF MY DLL FILE FROM END USER Pin
Bernhard Hiller12-Mar-13 5:00
Bernhard Hiller12-Mar-13 5:00 
Questionhow i protect my dll from end user Pin
seema jadhav11-Mar-13 21:02
seema jadhav11-Mar-13 21:02 
QuestionChanging C# control reference Pin
Member 979127411-Mar-13 20:00
Member 979127411-Mar-13 20:00 
AnswerRe: Changing C# control reference Pin
Pete O'Hanlon12-Mar-13 8:11
mvePete O'Hanlon12-Mar-13 8:11 
QuestionFile download in Class Library Pin
Member 961703711-Mar-13 18:18
Member 961703711-Mar-13 18:18 
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 
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 
No problem!

By using a property as in the code I posted, or using DateTime.Now each time directly rather than a cached field as you were attempting previously.

Edit: If you want to make it a little less wordy to access you could just create a static property or method that does it all for you:
C#
public static class DateTimeHelpers
{
    private const string MonthDayFormat = "MM/dd";

    public static string NowMonthDayString
    {
        get { return DateTime.Now.ToString(MonthDayFormat); }
    }
}

C#
textBox1.Text = DateTimeHelpers.NowMonthDayString;

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: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 

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.