Merge pull request #1861 from saper/home-override
[mono-project.git] / mcs / tests / gtest-188.cs
blobf4f2031e09948f92ac16ef58141bf0ab142b9a69
1 using System;
3 public class Foo {
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");
16 else
17 Console.WriteLine ("boo! array is of type {0}", array.GetType ());
19 if (array[0] == context)
20 Console.WriteLine ("ok! array[0] == context!");
21 else
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;