Getting generic type definition information : Type : Reflection C# Examples


C# Examples » Reflection » Type »

 

Getting generic type definition information









    
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()
        {
                Console.WriteLine(typeof(List<>).Equals(typeof(List<int>).GetGenericTypeDefinition()));
        }
}
    
   
  
   



Output

True


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Reflection
» Type