System.Type.TypeInitializer Property

Gets the initializer for the Type.

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public System.Reflection.ConstructorInfo TypeInitializer { get; }

Value

A System.Reflection.ConstructorInfo containing the name of the static constructor for the type represented by the current instance

Remarks

Class initializers are also available through the Type.FindMembers(System.Reflection.MemberTypes, System.Reflection.BindingFlags, System.Reflection.MemberFilter, object) method, or through overloads of the erload:System.Type.GetMember, erload:System.Type.GetMembers, erload:System.Type.GetConstructor, and erload:System.Type.GetConstructors methods that take System.Reflection.BindingFlags as a parameter.

If the current Type represents a type parameter in the definition of a generic type or generic method, this property returns null.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0