Mega Code Archive

 
Categories / C# Tutorial / Reflection
 

Get the Type representation

using System; using System.Collections.Generic; using System.Text; using System.Threading; using System.Reflection; using System.Reflection.Emit; public class MainClass {     public static void Main()     {         Type typeInfo = typeof(object);         MethodInfo methInfo = typeInfo.GetMethod("ToString");         Console.WriteLine("Info: {0}", methInfo);     } } Info: System.String ToString()