MethodBase Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides information about methods and constructors.
public ref class MethodBase abstract : System::Reflection::MemberInfo
public ref class MethodBase abstract : System::Reflection::MemberInfo, System::Runtime::InteropServices::_MethodBase
public abstract class MethodBase : System.Reflection.MemberInfo
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Serializable]
public abstract class MethodBase : System.Reflection.MemberInfo, System.Runtime.InteropServices._MethodBase
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public abstract class MethodBase : System.Reflection.MemberInfo, System.Runtime.InteropServices._MethodBase
type MethodBase = class
inherit MemberInfo
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Serializable>]
type MethodBase = class
inherit MemberInfo
interface _MethodBase
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type MethodBase = class
inherit MemberInfo
interface _MethodBase
Public MustInherit Class MethodBase
Inherits MemberInfo
Public MustInherit Class MethodBase
Inherits MemberInfo
Implements _MethodBase
- Inheritance
- Derived
- Attributes
- Implements
MethodBase
is the base class of MethodInfo and ConstructorInfo.
When you inherit from MethodBase
, you must override the following members: GetParameters(), Invoke(Object, BindingFlags, Binder, Object[], CultureInfo), GetMethodImplementationFlags(), MethodHandle, Attributes, Name, DeclaringType, MemberType, ReflectedType, GetCustomAttributes(Boolean), GetCustomAttributes(Type, Boolean), and IsDefined(Type, Boolean).
Method |
Initializes a new instance of the MethodBase class. |
Attributes |
Gets the attributes associated with this method. |
Calling |
Gets a value indicating the calling conventions for this method. |
Contains |
Gets a value indicating whether the generic method contains unassigned generic type parameters. |
Custom |
Gets a collection that contains this member's custom attributes. (Inherited from MemberInfo) |
Declaring |
Gets the class that declares this member. (Inherited from MemberInfo) |
Is |
Gets a value indicating whether the method is abstract. |
Is |
Gets a value indicating whether the potential visibility of this method or constructor is described by Assembly; that is, the method or constructor is visible at most to other types in the same assembly, and is not visible to derived types outside the assembly. |
Is |
Gets a value that indicates whether this MemberInfo object is part of an assembly held in a collectible AssemblyLoadContext. (Inherited from MemberInfo) |
Is |
|
Is |
Gets a value indicating whether the method is a constructor. |
Is |
Gets a value indicating whether the visibility of this method or constructor is described by Family; that is, the method or constructor is visible only within its class and derived classes. |
Is |
Gets a value indicating whether the visibility of this method or constructor is described by FamANDAssem; that is, the method or constructor can be called by derived classes, but only if they are in the same assembly. |
Is |
Gets a value indicating whether the potential visibility of this method or constructor is described by FamORAssem; that is, the method or constructor can be called by derived classes wherever they are, and by classes in the same assembly. |
Is |
Gets a value indicating whether this method is |
Is |
Gets a value indicating whether the method is generic. |
Is |
Gets a value indicating whether the method is a generic method definition. |
Is |
Gets a value indicating whether only a member of the same kind with exactly the same signature is hidden in the derived class. |
Is |
Gets a value indicating whether this member is private. |
Is |
Gets a value indicating whether this is a public method. |
Is |
Gets a value that indicates whether the current method or constructor is security-critical or security-safe-critical at the current trust level, and therefore can perform critical operations. |
Is |
Gets a value that indicates whether the current method or constructor is security-safe-critical at the current trust level; that is, whether it can perform critical operations and can be accessed by transparent code. |
Is |
Gets a value that indicates whether the current method or constructor is transparent at the current trust level, and therefore cannot perform critical operations. |
Is |
Gets a value indicating whether this method has a special name. |
Is |
Gets a value indicating whether the method is |
Is |
Gets a value indicating whether the method is |
Member |
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) |
Metadata |
Gets a value that identifies a metadata element. (Inherited from MemberInfo) |
Method |
Gets a handle to the internal metadata representation of a method. |
Method |
Gets the MethodImplAttributes flags that specify the attributes of a method implementation. |
Module |
Gets the module in which the type that declares the member represented by the current MemberInfo is defined. (Inherited from MemberInfo) |
Name |
Gets the name of the current member. (Inherited from MemberInfo) |
Reflected |
Gets the class object that was used to obtain this instance of |
Equals(Object) |
Returns a value that indicates whether this instance is equal to a specified object. |
Equals(Object) |
Returns a value that indicates whether this instance is equal to a specified object. (Inherited from MemberInfo) |
Get |
Returns a |
Get |
When overridden in a derived class, returns an array of all custom attributes applied to this member. (Inherited from MemberInfo) |
Get |
When overridden in a derived class, returns an array of custom attributes applied to this member and identified by Type. (Inherited from MemberInfo) |
Get |
Returns a list of CustomAttributeData objects representing data about the attributes that have been applied to the target member. (Inherited from MemberInfo) |
Get |
Returns an array of Type objects that represent the type arguments of a generic method or the type parameters of a generic method definition. |
Get |
Returns the hash code for this instance. |
Get |
Returns the hash code for this instance. (Inherited from MemberInfo) |
Get |
When overridden in a derived class, gets a MethodBody object that provides access to the MSIL stream, local variables, and exceptions for the current method. |
Get |
Gets a MethodBase object for the constructor or method represented by the specified handle, for the specified generic type. |
Get |
Gets method information by using the method's internal metadata representation (handle). |
Get |
When overridden in a derived class, returns the MethodImplAttributes flags. |
Get |
When overridden in a derived class, gets the parameters of the specified method or constructor. |
Get |
|
Get |
Discovers the attributes of a member and provides access to member metadata. (Inherited from MemberInfo) |
Has |
(Inherited from MemberInfo) |
Invoke(Object, Binding |
When overridden in a derived class, invokes the reflected method or constructor with the given parameters. |
Invoke(Object, Object[]) |
Invokes the method or constructor represented by the current instance, using the specified parameters. |
Is |
When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. (Inherited from MemberInfo) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Equality(Method |
Indicates whether two MethodBase objects are equal. |
Inequality(Method |
Indicates whether two MethodBase objects are not equal. |
_Member |
Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from MemberInfo) |
_Member |
Gets a Type object representing the MemberInfo class. (Inherited from MemberInfo) |
_Member |
Retrieves the type information for an object, which can then be used to get the type information for an interface. (Inherited from MemberInfo) |
_Member |
Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from MemberInfo) |
_Member |
Provides access to properties and methods exposed by an object. (Inherited from MemberInfo) |
_Method |
Maps a set of names to a corresponding set of dispatch identifiers. |
_Method |
For a description of this member, see GetType(). |
_Method |
Retrieves the type information for an object, which can then be used to get the type information for an interface. |
_Method |
Retrieves the number of type information interfaces that an object provides (either 0 or 1). |
_Method |
Provides access to properties and methods exposed by an object. |
_Method |
For a description of this member, see IsAbstract. |
_Method |
For a description of this member, see IsAssembly. |
_Method |
For a description of this member, see IsConstructor. |
_Method |
For a description of this member, see IsFamily. |
_Method |
For a description of this member, see IsFamilyAndAssembly. |
_Method |
For a description of this member, see IsFamilyOrAssembly. |
_Method |
For a description of this member, see IsFinal. |
_Method |
For a description of this member, see IsHideBySig. |
_Method |
For a description of this member, see IsPrivate. |
_Method |
For a description of this member, see IsPublic. |
_Method |
For a description of this member, see IsSpecialName. |
_Method |
For a description of this member, see IsStatic. |
_Method |
For a description of this member, see IsVirtual. |
ICustom |
Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes. (Inherited from MemberInfo) |
ICustom |
Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type. (Inherited from MemberInfo) |
ICustom |
Indicates whether one or more instance of |
Get |
Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. |
Get |
Retrieves a custom attribute of a specified type that is applied to a specified member. |
Get |
Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. |
Get |
Retrieves a custom attribute of a specified type that is applied to a specified member. |
Get |
Retrieves a collection of custom attributes that are applied to a specified member, and optionally inspects the ancestors of that member. |
Get |
Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member. |
Get |
Retrieves a collection of custom attributes of a specified type that are applied to a specified member. |
Get |
Retrieves a collection of custom attributes that are applied to a specified member. |
Get |
Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member. |
Get |
Retrieves a collection of custom attributes of a specified type that are applied to a specified member. |
Is |
Indicates whether custom attributes of a specified type are applied to a specified member, and, optionally, applied to its ancestors. |
Is |
Indicates whether custom attributes of a specified type are applied to a specified member. |
Get |
Gets a metadata token for the given member, if available. |
Has |
Returns a value that indicates whether a metadata token is available for the specified member. |
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 2.0, 2.1 |
UWP | 10.0 |
This type is thread safe.
.NET feedback
.NET is an open source project. Select a link to provide feedback: