John Liu .NET

View Original

Quiz: The default operator

Hot on the trail of the previous quiz.
There's a default operator in C# (2.0)
Do you know what this does:

Type t = <anything>;
object x = default ( t );

Answer: http://msdn2.microsoft.com/en-us/library/xwth0h0d.aspx