Click here to Skip to main content
15,905,028 members
Home / Discussions / C#
   

C#

 
GeneralSelf describing functions Pin
IanC14-Oct-02 11:38
IanC14-Oct-02 11:38 
GeneralRe: Self describing functions Pin
Marc Clifton14-Oct-02 12:11
mvaMarc Clifton14-Oct-02 12:11 
GeneralRe: Self describing functions Pin
Anonymous14-Oct-02 22:23
Anonymous14-Oct-02 22:23 
GeneralRe: Self describing functions Pin
Marc Clifton15-Oct-02 1:27
mvaMarc Clifton15-Oct-02 1:27 
QuestionGetting Current Date? Pin
afronaut14-Oct-02 9:28
afronaut14-Oct-02 9:28 
AnswerRe: Getting Current Date? Pin
Stephane Rodriguez.14-Oct-02 9:42
Stephane Rodriguez.14-Oct-02 9:42 
GeneralRe: Getting Current Date? Pin
afronaut14-Oct-02 9:58
afronaut14-Oct-02 9:58 
GeneralRe: Getting Current Date? Pin
leppie14-Oct-02 10:45
leppie14-Oct-02 10:45 
afronaut wrote:
but in C# you cannot say:

string x = new DateTime().Now.ToString();


Now is a static property of the DateTime class. When getting the property, a DateTime instance is created for you, so no need to do it again. Smile | :) Tip: think of as just another construtor (like many other static methods that also returns an instance of a class) with a meaningful name. Now, that sound a lot better than just DateTime() , but it adds meaning to the object.

Hope this helps Smile | :)

Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
GeneralRe: Getting Current Date? Pin
afronaut14-Oct-02 11:10
afronaut14-Oct-02 11:10 
GeneralRe: Getting Current Date? Pin
Daniel Turini15-Oct-02 2:10
Daniel Turini15-Oct-02 2:10 
AnswerRe: Getting Current Date? Pin
Anonymous14-Oct-02 10:05
Anonymous14-Oct-02 10:05 
GeneralRe: Getting Current Date? Pin
leppie14-Oct-02 11:09
leppie14-Oct-02 11:09 
QuestionHow do you send an email message? Pin
David Flores14-Oct-02 5:07
David Flores14-Oct-02 5:07 
AnswerRe: How do you send an email message? Pin
Daniel Turini14-Oct-02 5:12
Daniel Turini14-Oct-02 5:12 
GeneralRe: How do you send an email message? Pin
Pete Bassett14-Oct-02 6:52
Pete Bassett14-Oct-02 6:52 
AnswerRe: How do you send an email message? Pin
leppie14-Oct-02 7:30
leppie14-Oct-02 7:30 
AnswerRe: How do you send an email message? Pin
Hugh Jass14-Oct-02 7:50
Hugh Jass14-Oct-02 7:50 
AnswerRe: How do you send an email message? Pin
Hakan Eskici15-Oct-02 5:36
Hakan Eskici15-Oct-02 5:36 
AnswerRe: How do you send an email message? Pin
David Flores15-Oct-02 8:02
David Flores15-Oct-02 8:02 
GeneralListview - Desperate for help! Pin
Darryl Borden14-Oct-02 4:26
Darryl Borden14-Oct-02 4:26 
GeneralRe: Listview - Desperate for help! Pin
Daniel Turini14-Oct-02 4:59
Daniel Turini14-Oct-02 4:59 
GeneralRe: Listview - Desperate for help! Pin
Darryl Borden14-Oct-02 5:27
Darryl Borden14-Oct-02 5:27 
GeneralRe: Listview - Desperate for help! Pin
Daniel Turini14-Oct-02 5:26
Daniel Turini14-Oct-02 5:26 
QuestionI miss header files. Do you? Pin
Marc Clifton14-Oct-02 1:46
mvaMarc Clifton14-Oct-02 1:46 
AnswerRe: I miss header files. Do you? Pin
Marc Clifton14-Oct-02 1:47
mvaMarc Clifton14-Oct-02 1:47 

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.