Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

MethodBase Class

Provides information about methods and constructors.

Namespace:  System.Reflection
Assembly:  mscorlib (in mscorlib.dll)
[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.None)]
public abstract class MethodBase : MemberInfo

The MethodBase type exposes the following members.

  NameDescription
Protected methodMethodBaseInitializes a new instance of the MethodBase class.
Top
  NameDescription
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360AttributesGets the attributes associated with this method.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360CallingConventionGets a value that indicates the calling conventions for this method.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360ContainsGenericParametersGets a value that indicates whether the generic method contains unassigned generic type parameters.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360DeclaringTypeGets the class that declares this member. (Inherited from MemberInfo.)
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsAbstractGets a value that indicates whether the method is abstract (MustInherit in Visual Basic).
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsAssemblyGets a value that indicates whether the potential visibility of this method or constructor is described by MethodAttributes.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.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsConstructorGets a value that indicates whether the method is a constructor.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsFamilyGets a value that indicates whether the visibility of this method or constructor is described by MethodAttributes.Family; that is, the method or constructor is visible only within its class and derived classes.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsFamilyAndAssemblyGets a value that indicates whether the visibility of this method or constructor is described by MethodAttributes.FamANDAssem; that is, the method or constructor can be called by derived classes, but only if they are in the same assembly.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsFamilyOrAssemblyGets a value that indicates whether the potential visibility of this method or constructor is described by MethodAttributes.FamORAssem; that is, the method or constructor can be called by derived classes wherever they are, and by classes in the same assembly.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsFinalGets a value that indicates whether this method is final (NotOverridable in Visual Basic).
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsGenericMethodGets a value that indicates whether the method is generic.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsGenericMethodDefinitionGets a value that indicates whether the method is a generic method definition.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsHideBySigGets a value that indicates whether only a member of the same kind with exactly the same signature is hidden in the derived class.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsPrivateGets a value that indicates whether this member is private.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsPublicGets a value that indicates whether this is a public method.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsSpecialNameGets a value that indicates whether this method has a special name.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsStaticGets a value that indicates whether the method is static (Shared in Visual Basic).
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360IsVirtualGets a value that indicates whether the method is virtual (Overridable in Visual Basic).
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360MemberTypeWhen 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 propertySupported by Silverlight for Windows PhoneSupported by Xbox 360MetadataTokenGets a value that identifies a metadata element. (Inherited from MemberInfo.)
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360MethodHandleGets a handle to the internal metadata representation of a method.
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360ModuleGets the module in which the type that declares the member represented by the current MemberInfo is defined. (Inherited from MemberInfo.)
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360NameGets the name of the current member. (Inherited from MemberInfo.)
Public propertySupported by Silverlight for Windows PhoneSupported by Xbox 360ReflectedTypeGets the class object that was used to obtain this instance of MemberInfo. (Inherited from MemberInfo.)
Top
  NameDescription
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360Equals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360FinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360GetCurrentMethodReturns a MethodBase object that represents the currently executing method.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetCustomAttributes(Boolean)When overridden in a derived class, returns an array of all custom attributes applied to this member. (Inherited from MemberInfo.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetCustomAttributes(Type, Boolean)When overridden in a derived class, returns an array of custom attributes applied to this member and identified by Type. (Inherited from MemberInfo.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetGenericArgumentsReturns an array of Type objects that represent the type arguments of a generic method or the type parameters of a generic method definition.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360GetMethodFromHandle(RuntimeMethodHandle)Gets method information for the method that is represented by the specified handle.
Public methodStatic memberSupported by Silverlight for Windows PhoneSupported by Xbox 360GetMethodFromHandle(RuntimeMethodHandle, RuntimeTypeHandle)Gets the constructor or method represented by the specified handle, for the specified generic type.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetMethodImplementationFlagsWhen overridden in a derived class, returns the MethodImplAttributes flags.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetParametersWhen overridden in a derived class, gets the parameters of this method or constructor.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360Invoke(Object, Object[])Invokes the method or constructor represented by the current instance, using the specified parameters.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)When overridden in a derived class, invokes the reflected method or constructor with the given parameters.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360IsDefinedWhen 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.)
Protected methodSupported by Silverlight for Windows PhoneSupported by Xbox 360MemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360ToStringReturns a string that represents the current object. (Inherited from Object.)
Top

MethodBase is the base class of MethodInfo and ConstructorInfo.

Silverlight-based applications cannot create classes that inherit from the MethodBase class.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

This type is thread safe.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.