Mono Class Library: System.Reflection.ConstructorInfo Overview | Members

System.Reflection.ConstructorInfo.TypeConstructorName Field

A string containing the name of a type initializer as it is stored in metadata. [Edit]

Value: .cctor

[System.Runtime.InteropServices.ComVisible(true)]
public static readonly string TypeConstructorName

Remarks

This field is read-only.

This field is a string that contains the value ".cctor".

Note:

A type initializer can be applied to all types. It allows the type to perform any initialization required before any members declared within the type are accessed. Type initializers accept no parameters and always have a return type of void. A type constructor only has access to a type's static fields and its usual purpose is to initialize those fields. A type's constructor is guaranteed to run before any instance of the type is created and before any static field or method of the type is referenced.

Many languages (including C#) automatically generate type constructors for all implementer-defined types. However, some languages require that type constructors be explicitly implemented.

For more information on type initializers, see Partition II of the CLI Specification.

[Edit]

Requirements

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