What does double? mean in C# ?
- by Nikhil
Hi,
While reading the code of the NUnit project's assert class, I came across this particular construct -
public static void AreEqual(double expected, double? actual, double delta)
{
AssertDoublesAreEqual(expected, (double)actual, delta ,null, null);
}
In this function the second input parameter is entered as "double?".
The interesting thing is that this code compiles without issue in VS2010 (c# 4.0).
Anyone know why this is NOT throwing an error ? Why is "double?" considered a valid keyword and is there any special significance to the "?".