Export (0) Print
Expand All

Type.FullName Property

Gets the fully qualified name of the Type, including the namespace of the Type but not the assembly.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

public abstract string FullName { get; }
/** @property */
public abstract String get_FullName ()

public abstract function get FullName () : String

Property Value

A string containing the fully qualified name of the Type, including the namespace of the Type but not the assembly, or a null reference (Nothing in Visual Basic) if the current instance represents a generic type parameter.

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 AssemblyQualifiedName property.

If the current Type represents a generic type, the type arguments in the string returned by 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, this property returns a null reference (Nothing in Visual Basic).

This property is read-only.

The following example displays the full name of the specified type.

using System;
class TestFullName 
{
public static void Main() 
    {
    Type t = typeof(Array);
    Console.WriteLine("The full name of the Array type is {0}.", t.FullName);
    }
} 

import System.*;

class TestFullName
{
    public static void main(String[] args)
    {
        Type t = Array.class.ToType();
        Console.WriteLine("The full name of the Array type is {0}.", 
            t.get_FullName());
    } //main
} //TestFullName

This code produces the following output:

The full name of the Array type is System.Array

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft