Gets the fully qualified name of the Type, including the namespace of the Type but not the assembly.
A string containing the fully qualified name of the Type.
For example, the fully qualified name of the C# string type is System.String. Contrast this with the assembly-qualified name, which is the full name plus the assembly, provided by the Type.AssemblyQualifiedName property.
If the current Type represents a generic type, the type arguments in the string returned by Type.FullName are qualified by their assembly, version, and so on, even though the string representation of the generic type itself is not qualified by assembly. Thus, concatenating t.FullName + ", " + t.Assembly.FullName produces a result that is equivalent to t.AssemblyQualifiedName, as is the case with types that are not generic.
If the current Type represents a type parameter of a generic type, or an array type, pointer type, or byref type based on a type parameter, this property returns null.
If the current type contains generic type parameters that have not been replaced by specific types (that is, the Type.ContainsGenericParameters property returns true), but the type is not a generic type definition (that is, the Type.IsGenericTypeDefinition property returns false), this property returns null. For example, consider the classes Base and Derived in the following code.
code reference: System.Type.FullName#1
If you use the Type.BaseType property to obtain the base type of Derived, the Type.FullName property of the resulting Type object returns null. To get a non-null Type.FullName, you can use the Type.GetGenericTypeDefinition method to get the generic type definition.
This property is read-only.
The following example demonstrates using the Type.FullName property.
C# Example
using System; class TestType { public static void Main() { Type t = typeof(Array); Console.WriteLine("Full name of Array type is {0}",t.FullName); } }
The output is
Full name of Array type is System.Array