Nullable types
Bill Baxter
wbaxter at gmail.com
Mon Oct 20 17:35:05 PDT 2008
On Tue, Oct 21, 2008 at 9:11 AM, Lionello Lunesu <lio at lunesu.remove.com> wrote:
> Bent Rasmussen wrote:
>>
>> Not true. It wraps the value type in a struct with a boolean field
>> expressing whether it is null or not.
>>
>> http://msdn.microsoft.com/en-us/library/1t3y8s4s(VS.80).aspx
>
> Indeed. Thanks for pointing that out.
>
> So C#'s 'foo?' syntax has even less to do with this compile-time nullness
> checking.
Now it makes sense. Yes the C# feature is apparently just a
convenient way to create a value type with a special
"none-of-the-above" value.
I guess this feature is driven by need to connect with databases that
often have nullable types.
This chapter of a C# 2.0 book covering Nullable Types seems to agree
with that assessment :
http://www.springerlink.com/content/w2mh0571776t3114/
--bb
More information about the Digitalmars-d
mailing list