TypeLoadException.TypeName Property

July 28, 2014

Gets the fully qualified name of the type that causes the exception.

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

public string TypeName { get; }

Property Value

Type: System.String
The fully qualified type name.

Notes to Inheritors

When overriding TypeName in a derived class, be sure to call the base class's TypeName property.

This property is read-only.

The following example attempts to load a non-existent type from the mscorlib assembly. The resulting exception is caught, and the TypeName and Message values are displayed. For this code example to run, you must provide the fully qualified assembly name.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2014 Microsoft