Quick Puzzle: what does this program print?
You have 30 seconds left... just kidding :-)
using System;
using System.Collections;
using System.Reflection;
class Hello
{
Type Unknown { get { return World.GetType(); } }
object[] Knowledge() { return Unknown.GetProperties(); }
string[] Library()
{
return Array.ConvertAll<object, string>(
Knowledge(),
delegate(object x) { return x.ToString(); });
}
public static Hello World { get { return new Hello(); } }
static void Main(string[] args)
{
if (args.Length > 0)
Console.WriteLine(args[0]);
else
Main(World.Library());
}
}
[update. The code above compiles only with the C# 2.0 compiler. The simplest way to get started is to download Visual C# Express from here]