Re: Should I explicitly initialize all member variables?
- From: Jeff Louie <jeff_louie@xxxxxxxxx>
- Date: Sun, 14 Aug 2005 10:57:28 -0700
Javamman.. The following two lines of code are NOT equivalent in C#.
>MyClass m = null; // redundant
MyClass m; // better?<
The second line simply creates an unitialized variable. It does not
default to null.
http://www.geocities.com/Jeff_Louie/OOP/oop5.htm
Regards,
Jeff
*** Sent via Developersdex http://www.developersdex.com ***
.
- Follow-Ups:
- Re: Should I explicitly initialize all member variables?
- From: Jon Skeet [C# MVP]
- Re: Should I explicitly initialize all member variables?
- References:
- Should I explicitly initialize all member variables?
- From: Javaman59
- Should I explicitly initialize all member variables?
- Prev by Date: Re: Writing a "Command Prompt"
- Next by Date: Windows Services
- Previous by thread: RE: Should I explicitly initialize all member variables?
- Next by thread: Re: Should I explicitly initialize all member variables?
- Index(es):
Relevant Pages
|