Search Results for

    Show / Hide Table of Contents

    Class MethodBase

    Provides information about methods and constructors.

    Inheritance
    object
    MemberInfo
    MethodBase
    ConstructorInfo
    MethodInfo
    Inherited Members
    MemberInfo.GetCustomAttributes(bool)
    MemberInfo.MemberType
    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 MethodBase : MemberInfo
    Remarks

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

    Constructors

    MethodBase()

    Declaration
    protected MethodBase()

    Properties

    DeclaringType

    Gets the class that declares this member.

    Declaration
    public override Type DeclaringType { get; }
    Property Value
    Type Description
    Type

    The Type object for the class that declares this member.

    Overrides
    MemberInfo.DeclaringType

    IsAbstract

    Gets a value indicating whether the method is abstract

    Declaration
    public bool IsAbstract { get; }
    Property Value
    Type Description
    bool

    true if this method is abstract; otherwise, false.

    IsFinal

    GGets a value indicating whether the method is final.

    Declaration
    public bool IsFinal { get; }
    Property Value
    Type Description
    bool

    true if this method is final; otherwise, false.

    IsPublic

    Gets a value indicating whether this is a public method.

    Declaration
    public bool IsPublic { get; }
    Property Value
    Type Description
    bool

    true if this method is public; otherwise, false.

    IsStatic

    Gets a value indicating whether the method is static.

    Declaration
    public bool IsStatic { get; }
    Property Value
    Type Description
    bool

    true if this method is static; otherwise, false.

    IsVirtual

    Gets a value indicating whether the method is virtual

    Declaration
    public bool IsVirtual { get; }
    Property Value
    Type Description
    bool

    true if this method is virtual; otherwise, false.

    Name

    Gets the name of the current member.

    Declaration
    public override string Name { get; }
    Property Value
    Type Description
    string

    A String containing the name of this member.

    Overrides
    MemberInfo.Name

    Methods

    GetParameters()

    When overridden in a derived class, gets the parameters of the specified method or constructor.

    Declaration
    public abstract ParameterInfo[] GetParameters()
    Returns
    Type Description
    ParameterInfo[]

    An array of type ParameterInfo containing information that matches the signature of the method (or constructor) reflected by this MethodBase instance.

    Invoke(object, object[])

    Invokes the method or constructor represented by the current instance, using the specified parameters.

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

    The object on which to invoke the method or constructor. If a method is static, this argument is ignored. If a constructor is static, this argument must be null or an instance of the class that defines the constructor.

    object[] parameters

    An argument list for the invoked method or constructor. This is an array of objects with the same number, order, and type as the parameters of the method or constructor to be invoked. If there are no parameters, parameters should be null.

    Returns
    Type Description
    object

    An object containing the return value of the invoked method, or null in the case of a 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