[Mono-dev] CS0019 for value type != null
Casey Marshall
cmarshall at pacificbiosciences.com
Tue Apr 8 16:24:02 EDT 2008
On Tue, 2008-04-08 at 20:38 +0100, Marek Safar wrote:
> Hello,
> > I'm working with code that does this:
> >
> > if (valuetype != null)
> > {
> > // Code assuming `valuetype' is initialized.
> > }
> >
> This is correct, and `valuetype' will be always initialized
>
Yes, but the body of the 'if' is only correct if the default
initialization makes sense. I should have said "initialized
properly" ;-)
Thanks.
More information about the Mono-devel-list
mailing list