Use Type.IsClass to check if a type is a class : Type : Reflection C# Source Code


Custom Search

C# Source Code » Reflection » Type »

 

Use Type.IsClass to check if a type is a class








    
 
using System;
using System.Reflection;

class NameType
{
  public static void Main()
  {
        Type t = Type.GetType("System.String");
    Console.WriteLine("Name : {0}",t.Name);
    Console.WriteLine("Underlying System Type : {0}",t.UnderlyingSystemType);
    Console.WriteLine("Is Class : {0}",t.IsClass);
  }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Reflection
» Type