>>> Something = null
>>> f as Nullable of System.Single = Something
>>> f
>>> f == null
----^
ERROR: 'is' can't be used with a value type ('System.Nullable`1[[System.Single, mscorlib, Version=2.
0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]')
Description
>>> Something = null
>>> f as Nullable of System.Single = Something
>>> f
>>> f == null
----^
ERROR: 'is' can't be used with a value type ('System.Nullable`1[[System.Single, mscorlib, Version=2.
0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]')
The compiler should translate null-tests on nullable types to tests using the HasValue field.
We should also implement some shorthand syntax for Nullable of T, like T? in C#.
Avishay Lavie - 07/Apr/07 08:46 AM The compiler should translate null-tests on nullable types to tests using the HasValue field.
We should also implement some shorthand syntax for Nullable of T, like T? in C#.
We should also implement some shorthand syntax for Nullable of T, like T? in C#.