Search Results for

    Show / Hide Table of Contents

    Class ConstructorInfo

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

    Inheritance
    object
    MemberInfo
    MethodBase
    ConstructorInfo
    Inherited Members
    MethodBase.GetParameters()
    MethodBase.Invoke(object, object[])
    MethodBase.IsPublic
    MethodBase.IsStatic
    MethodBase.IsFinal
    MethodBase.IsVirtual
    MethodBase.IsAbstract
    MethodBase.Name
    MethodBase.DeclaringType
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: System.Reflection
    Assembly: mscorlib.dll
    Syntax
    public abstract class ConstructorInfo : MethodBase
    Remarks

    Available only in mscorlib build with support for System.Reflection.

    Constructors

    ConstructorInfo()

    Declaration
    protected ConstructorInfo()

    Properties

    MemberType

    Gets a MemberTypes value indicating that this member is a constructor.

    Declaration
    public override MemberTypes MemberType { get; }
    Property Value
    Type Description
    MemberTypes

    A MemberTypes value indicating that this member is a constructor.

    Overrides
    MemberInfo.MemberType

    Methods

    GetCustomAttributes(bool)

    When overridden in a derived class, returns an array of all custom attributes applied to this member.

    Declaration
    public override object[] GetCustomAttributes(bool inherit)
    Parameters
    Type Name Description
    bool inherit

    true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events.

    Returns
    Type Description
    object[]

    An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined.

    Overrides
    MemberInfo.GetCustomAttributes(bool)
    Remarks

    This method is not implemented in nanoFramework.

    Exceptions
    Type Condition
    NotImplementedException

    Invoke(object[])

    Invokes the constructor reflected by the instance that has the specified parameters, providing default values for the parameters not commonly used.

    Declaration
    public object Invoke(object[] parameters)
    Parameters
    Type Name Description
    object[] parameters

    An array of values that matches the number, order and type (under the constraints of the default binder) of the parameters for this constructor. If this constructor takes no parameters, then use either an array with zero elements or null, as in Object[] parameters = new Object[0]. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. For reference-type elements, this value is null. For value-type elements, this value is 0, 0.0, or false, depending on the specific element type.

    Returns
    Type Description
    object

    An instance of the class associated with the constructor.

    Extension Methods

    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    LogDispatcher.GetCurrentClassLogger(object)
    In This Article
    Back to top Copyright © 2023 nanoFramework Contributors
    Generated by DocFX