Nullable is just a normal class like MyClass or System.String ( Nullable<T> is a structure, though).
So, if you type:
class _Nullable {} struct _Nullable<T> {} class Program { static void Main() { string a = ""; Console.Write(a is _Nullable); } }
You will not be surprised if it returns false correctly?
If you want to check if something is null or not, you can use if(!(a is ValueType))
string a = ""; Console.Write("a is nullable = {0}", !(a is ValueType));
Output: a is nullable = true
Fabjan
source share