Merge pull request #5210 from alexrp/profiler-runtime-settings
[mono.git] / mono / tests / event-get.2.cs
1 using System;
2 using System.Reflection;
3
4 class Test {
5
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]);
14                 }
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]);
21                 }
22                 if (others.Length != 2)
23                         return 2;
24                 return 0;
25         }
26 }
27