5 public static void Main ()
7 new Foo (new object[] { "foo" });
10 public Foo (object[] array) : this (array, array[0]) {}
12 public Foo (object[] array, object context)
14 if (array.GetType().IsArray)
15 Console.WriteLine ("ok! array is correct type");
17 Console.WriteLine ("boo! array is of type {0}", array.GetType ());
19 if (array[0] == context)
20 Console.WriteLine ("ok! array[0] == context!");
22 Console.WriteLine ("boo! array[0] != context!");
24 foreach (char ch in "123") {
25 DoSomething += delegate (object obj, EventArgs args) {
26 Console.WriteLine ("{0}:{1}:{2}", ch, array[0], context);
31 public event EventHandler DoSomething;