Answer to C# Riddle
Omer van Kloeten solved it.
test(typeof(bool));
static void test( object t)
{
Console.WriteLine(t.GetType().FullName);
}
Print System.RuntimeType (a subtype of System.Type) to the console.
I was expecting System.Boolean and that caused some head scratching. It was a call hidden five or six levels deep, and I couldn't for the life of me understand what was going on.
Comments
Comment preview