blob: a27814b9ed8b8ca7289ce9678d82257b63146c0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
using System;
interface Iface
{
int A { get; }
void B ();
event Action C;
void D (int a, string b);
string E { get; }
}
class X
{
public static int Main ()
{
var res = typeof(Iface).GetMembers ();
// Ensure metadata order matches source code order
if (res [0].Name != "get_A")
return 1;
if (res [1].Name != "B")
return 2;
if (res [2].Name != "add_C")
return 3;
if (res [3].Name != "remove_C")
return 4;
if (res [4].Name != "D")
return 5;
if (res [5].Name != "get_E")
return 6;
return 0;
}
}
|