C# has nullable types. This gives us the ability to assign null to value types:
System.Nullable<int> x = null; //nullable integer x
int? y = 3; //C# shorthand notation for nullable integer y
Console.WriteLine(x.HasValue); //false
Console.WriteLine(y.HasValue); //true
Console.WriteLine(x == null); //true
Console.WriteLine(x == y); //false;
Console.WriteLine(x ?? 0); //short for x.HasValue ? x : 0; which is short for if...then..else
Microsoft writes the following in the C# Programming Guide about nullable types: "The ability to assign null to numeric and Boolean types is particularly useful when dealing with databases and other data types containing elements that may not be assigned a value. For example, a Boolean field in a database can store the values true or false, or it may be undefined."
Then why is it that the Typed DataSet generator in Visual Studio 2005 doesn't use nullable types in it's typed DataRow classes for columns that could be null? Instead we're still stuck with the IsNull() and SetNull() methods. This really is a missed opportunity imho. Perhaps they've had good reasons not to implement nullable types for typed dataset rows but I can't think of any. Leave me a comment if you know why.