Obtain the handles : Type : Reflection C# Examples


C# Examples » Reflection » Type »

 

Obtain the handles









    
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");
                RuntimeTypeHandle  typeHandle  =  typeInfo.TypeHandle;
                RuntimeMethodHandle  methHandle  =  methInfo.MethodHandle;
                Console.WriteLine("Handle:  {0}",  methHandle);
        }
}
    
   
  
   



Output

Handle: System.RuntimeMethodHandle


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Reflection
» Type