Share via


MethodBase Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides information about methods and constructors.

Inheritance Hierarchy

System. . :: . .Object
  System.Reflection. . :: . .MemberInfo
    System.Reflection..::..MethodBase
      System.Reflection. . :: . .ConstructorInfo
      System.Reflection. . :: . .MethodInfo

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
<SerializableAttribute> _
Public MustInherit Class MethodBase _
    Inherits MemberInfo
[SerializableAttribute]
public abstract class MethodBase : MemberInfo
[SerializableAttribute]
public ref class MethodBase abstract : public MemberInfo
[<AbstractClass>]
[<SerializableAttribute>]
type MethodBase =  
    class
        inherit MemberInfo
    end
public abstract class MethodBase extends MemberInfo

The MethodBase type exposes the following members.

Constructors

  Name Description
Protected method MethodBase Initializes a new instance of the MethodBase class.

Top

Properties

  Name Description
Public property DeclaringType Gets the class that declares the current method. (Overrides MemberInfo. . :: . .DeclaringType.)
Public property IsAbstract Gets a value indicating whether the method is abstract.
Public property IsFinal Gets a value indicating whether this method is final.
Public property IsPublic Gets a value indicating whether this is a public method.
Public property IsStatic Gets a value indicating whether the method is static.
Public property IsVirtual Gets a value indicating whether the method is virtual.
Public property MemberType When overridden in a derived class, gets a MemberTypes value indicating the type of the member — method, constructor, event, and so on. (Inherited from MemberInfo.)
Public property Name Gets the name of the current method. (Overrides MemberInfo. . :: . .Name.)

Top

Methods

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Invoke Invokes the method or constructor represented by the current instance, using the specified parameters.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Remarks

MethodBase is the base class of MethodInfo and ConstructorInfo.

Thread Safety

This type is thread safe.

See Also

Reference

System.Reflection Namespace