Get the fully qualified name of the Type, including the namespace of the Type but not the assembly in CSharp

Description

The following code shows how to get the fully qualified name of the Type, including the namespace of the Type but not the assembly.

Example


using System;/*from w w  w  .  jav  a 2s. c o  m*/
class TestFullName 
{
    public static void Main() 
    {
        Type t = typeof(Array);
        Console.WriteLine("The full name of the Array type is {0}.", t.FullName);
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    Reflection »




Array
Constructor
Event
Field
Interface
Method
Properties
Type