Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Discovers the attributes of a method and provides access to method metadata.
Inheritance Hierarchy
System. . :: . .Object
System.Reflection. . :: . .MemberInfo
System.Reflection. . :: . .MethodBase
System.Reflection..::..MethodInfo
Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
<SerializableAttribute> _
Public MustInherit Class MethodInfo _
Inherits MethodBase
[SerializableAttribute]
public abstract class MethodInfo : MethodBase
[SerializableAttribute]
public ref class MethodInfo abstract : public MethodBase
[<AbstractClass>]
[<SerializableAttribute>]
type MethodInfo =
class
inherit MethodBase
end
public abstract class MethodInfo extends MethodBase
The MethodInfo type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() |
MethodInfo | Initializes a new instance of the MethodInfo class. |
Top
Properties
Name | Description | |
---|---|---|
![]() |
DeclaringType | Gets the class that declares the current method. (Inherited from MethodBase.) |
![]() |
IsAbstract | Gets a value indicating whether the method is abstract. (Inherited from MethodBase.) |
![]() |
IsFinal | Gets a value indicating whether this method is final. (Inherited from MethodBase.) |
![]() |
IsPublic | Gets a value indicating whether this is a public method. (Inherited from MethodBase.) |
![]() |
IsStatic | Gets a value indicating whether the method is static. (Inherited from MethodBase.) |
![]() |
IsVirtual | Gets a value indicating whether the method is virtual. (Inherited from MethodBase.) |
![]() |
MemberType | Gets a MemberTypes value indicating that this member is a method. (Overrides MemberInfo. . :: . .MemberType.) |
![]() |
Name | Gets the name of the current method. (Inherited from MethodBase.) |
![]() |
ReturnType | Gets the return type of this method. |
Top
Methods
Name | Description | |
---|---|---|
![]() |
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
Invoke | Invokes the method or constructor represented by the current instance, using the specified parameters. (Inherited from MethodBase.) |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
Instances of MethodInfo are obtained by calling the GetMethods or GetMethod method of a Type object or of an object that derives from Type, or by calling the MakeGenericMethod method of a MethodInfo that represents a generic method definition.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.