2 using System
.Collections
;
3 using System
.Reflection
;
9 public static int Main ()
11 BindingFlags flags
= BindingFlags
.NonPublic
| BindingFlags
.Instance
|
12 BindingFlags
.DeclaredOnly
;
13 Type type
= typeof (Info
);
15 PropertyInfo
[] properties
= type
.GetProperties (flags
);
16 if (properties
.Length
!= 2) {
17 Console
.WriteLine ("#1: " + properties
.Length
.ToString ());
20 if (properties
[0].Name
!= "System.Collections.IEnumerator.Current") {
21 Console
.WriteLine ("#2: " + properties
[0].Name
);
25 if (properties
[1].Name
!= "Mono.Test.ITest.Item") {
26 Console
.WriteLine ("#3: " + properties
[1].Name
);
38 object this [int index
]
46 class Info
: IEnumerator
, ITest
48 object IEnumerator
.Current
53 bool IEnumerator
.MoveNext ()
58 void IEnumerator
.Reset ()
62 object ITest
.this [int index
]