1 using System
.Reflection
;
2 using System
.Collections
;
6 internal class CM
: IComparer
{
7 public int Compare (object x
, object y
) {
8 return ((MethodInfo
)x
).Name
.CompareTo (((MethodInfo
)y
).Name
);
12 public static int Main(string[] args
) {
15 "GetHashCode", "GetType",
16 "ReferenceEquals", "ToString"
19 string name
= "System.Object";
22 Type t
= Type
.GetType (name
, true);
23 MethodInfo
[] ms
= t
.GetMethods();
25 Array
.Sort (ms
, new CM());
26 foreach (MethodInfo m
in ms
) {
27 Console
.WriteLine (m
.ReturnType
.Name
+ " " + m
.Name
);
29 if (name
== "System.Object") {
30 for (i
=0; i
< names
.Length
; ++i
)
31 if (names
[i
] != ms
[i
].Name
)