using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
class Sample
{
public static void Main()
{
var sorted = new SortedList<string, MethodInfo>();
foreach (MethodInfo m in typeof(object).GetMethods())
sorted[m.Name] = m;
foreach (string name in sorted.Keys) Console.WriteLine(name);
foreach (MethodInfo m in sorted.Values)
Console.WriteLine(m.Name + " returns a " + m.ReturnType);
}
}
The output:
Equals
GetHashCode
GetType
ReferenceEquals
ToString
Equals returns a System.Boolean
GetHashCode returns a System.Int32
GetType returns a System.Type
ReferenceEquals returns a System.Boolean
ToString returns a System.String
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |