System.Reflection.ConstructorInfo Class

Discovers the attributes of a class constructor and provides access to constructor metadata.

See Also: ConstructorInfo Members

Syntax

[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComDefaultInterface(typeof(System.Runtime.InteropServices._ConstructorInfo))]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class ConstructorInfo : MethodBase, System.Runtime.InteropServices._ConstructorInfo

Remarks

ConstructorInfo is used to discover the attributes of a constructor as well as to invoke a constructor. Objects are created by calling ConstructorInfo.Invoke(BindingFlags, Binder, Object[], System.Globalization.CultureInfo) on a ConstructorInfo returned by either the Type.GetConstructors or Type.GetConstructor(BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) method of a Type object.

Note:

System.Reflection.ConstructorInfo inherits from System.Reflection.MethodBase several members, such as MethodBase.IsGenericMethod, that can be used to examine generic methods. In the .NET Framework version 2.0 constructors cannot be generic, so these members return false or null.

Thread Safety

This type is safe for multithreaded operations.

Permissions

TypeReason
System.Security.Permissions.ReflectionPermissionRequires permission to reflect non-public members of a type in loaded assemblies. See System.Security.Permissions.ReflectionPermissionFlag.TypeInformation.

Requirements

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