[System] Tweak socket test
[mono-project.git] / mono / tests / event-get.2.cs
bloba259d357989594079dd64e849d462fb577df6ceb
1 using System;
2 using System.Reflection;
4 class Test {
6 static int Main () {
7 Assembly ass = Assembly.LoadFrom ("event-il.exe");
8 Type t = ass.GetType ("T");
9 EventInfo ev = t.GetEvent ("MyDo");
10 Console.WriteLine (ev.GetAddMethod ());
11 MethodInfo[] others = ev.GetOtherMethods ();
12 for (int i = 0; i < others.Length; ++i) {
13 Console.WriteLine (others [i]);
15 if (others.Length != 1)
16 return 1;
17 Console.WriteLine ("now with non-public, too:");
18 others = ev.GetOtherMethods (true);
19 for (int i = 0; i < others.Length; ++i) {
20 Console.WriteLine (others [i]);
22 if (others.Length != 2)
23 return 2;
24 return 0;