Querying Type Information by Name : Type « Data Types « C# / C Sharp






Querying Type Information by Name

Querying Type Information by Name

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);
  }
}
           
       








Related examples in the same category

1.Check the MinValue and MaxValue
2.Querying Type Information Using the Instance of an ObjectQuerying Type Information Using the Instance of an Object
3.Examining a Currently Running Process for Type InformationExamining a Currently Running Process for Type Information