mscorlib(4.0.0.0) API with additions
System.Reflection.MethodBase Class Referenceabstract

Provides information about methods and constructors. More...

Inheritance diagram for System.Reflection.MethodBase:
[legend]
Collaboration diagram for System.Reflection.MethodBase:
[legend]

Public Member Functions

override bool Equals (object obj)
 Returns a value that indicates whether this instance is equal to a specified object. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
abstract ParameterInfo [] GetParameters ()
 When overridden in a derived class, gets the parameters of the specified method or constructor. More...
 
abstract MethodImplAttributes GetMethodImplementationFlags ()
 When overridden in a derived class, returns the T:System.Reflection.MethodImplAttributes flags. More...
 
abstract object Invoke (object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
 When overridden in a derived class, invokes the reflected method or constructor with the given parameters. More...
 
virtual Type [] GetGenericArguments ()
 Returns an array of T:System.Type objects that represent the type arguments of a generic method or the type parameters of a generic method definition. More...
 
object Invoke (object obj, object[] parameters)
 Invokes the method or constructor represented by the current instance, using the specified parameters. More...
 
virtual MethodBody GetMethodBody ()
 When overridden in a derived class, gets a T:System.Reflection.MethodBody object that provides access to the MSIL stream, local variables, and exceptions for the current method. More...
 
- Public Member Functions inherited from System.Reflection.MemberInfo
abstract object [] GetCustomAttributes (bool inherit)
 When overridden in a derived class, returns an array of all custom attributes applied to this member. More...
 
abstract object [] GetCustomAttributes (Type attributeType, bool inherit)
 When overridden in a derived class, returns an array of custom attributes applied to this member and identified by T:System.Type. More...
 
abstract bool IsDefined (Type attributeType, bool inherit)
 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. More...
 
virtual IList< CustomAttributeDataGetCustomAttributesData ()
 Returns a list of T:System.Reflection.CustomAttributeData objects representing data about the attributes that have been applied to the target member. More...
 
override bool Equals (object obj)
 Returns a value that indicates whether this instance is equal to a specified object. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
- Public Member Functions inherited from System.Runtime.InteropServices._MemberInfo
new string ToString ()
 Provides COM objects with version-independent access to the M:System.Object.ToString method. More...
 
- Public Member Functions inherited from System.Runtime.InteropServices._MethodBase
new string ToString ()
 Provides COM objects with version-independent access to the M:System.Object.ToString method. More...
 
object [] GetCustomAttributes (Type attributeType, bool inherit)
 Provides COM objects with version-independent access to the M:System.Reflection.MemberInfo.GetCustomAttributes(System.Type,System.Boolean) method. More...
 
object [] GetCustomAttributes (bool inherit)
 Provides COM objects with version-independent access to the M:System.Reflection.MemberInfo.GetCustomAttributes(System.Boolean) method. More...
 
bool IsDefined (Type attributeType, bool inherit)
 Provides COM objects with version-independent access to the M:System.Reflection.MemberInfo.IsDefined(System.Type,System.Boolean) method. More...
 

Static Public Member Functions

static MethodBase GetMethodFromHandle (RuntimeMethodHandle handle)
 Gets method information by using the method's internal metadata representation (handle). More...
 
static MethodBase GetMethodFromHandle (RuntimeMethodHandle handle, RuntimeTypeHandle declaringType)
 Gets a T:System.Reflection.MethodBase object for the constructor or method represented by the specified handle, for the specified generic type. More...
 
static MethodBase GetCurrentMethod ()
 Returns a MethodBase object representing the currently executing method. More...
 
static bool operator== (MethodBase left, MethodBase right)
 Indicates whether two T:System.Reflection.MethodBase objects are equal. More...
 
static bool operator != (MethodBase left, MethodBase right)
 Indicates whether two T:System.Reflection.MethodBase objects are not equal. More...
 
- Static Public Member Functions inherited from System.Reflection.MemberInfo
static bool operator== (MemberInfo left, MemberInfo right)
 Indicates whether two T:System.Reflection.MemberInfo objects are equal. More...
 
static bool operator != (MemberInfo left, MemberInfo right)
 Indicates whether two T:System.Reflection.MemberInfo objects are not equal. More...
 

Properties

virtual MethodImplAttributes MethodImplementationFlags [get]
 Gets the T:System.Reflection.MethodImplAttributes flags that specify the attributes of a method implementation. More...
 
abstract RuntimeMethodHandle MethodHandle [get]
 Gets a handle to the internal metadata representation of a method. More...
 
abstract MethodAttributes Attributes [get]
 Gets the attributes associated with this method. More...
 
virtual CallingConventions CallingConvention [get]
 Gets a value indicating the calling conventions for this method. More...
 
virtual bool IsGenericMethodDefinition [get]
 Gets a value indicating whether the method is a generic method definition. More...
 
virtual bool ContainsGenericParameters [get]
 Gets a value indicating whether the generic method contains unassigned generic type parameters. More...
 
virtual bool IsGenericMethod [get]
 Gets a value indicating whether the method is generic. More...
 
virtual bool IsSecurityCritical [get]
 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. More...
 
virtual bool IsSecuritySafeCritical [get]
 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. More...
 
virtual bool IsSecurityTransparent [get]
 Gets a value that indicates whether the current method or constructor is transparent at the current trust level, and therefore cannot perform critical operations. More...
 
bool IsPublic [get]
 Gets a value indicating whether this is a public method. More...
 
bool IsPrivate [get]
 Gets a value indicating whether this member is private. More...
 
bool IsFamily [get]
 Gets a value indicating whether the visibility of this method or constructor is described by F:System.Reflection.MethodAttributes.Family; that is, the method or constructor is visible only within its class and derived classes. More...
 
bool IsAssembly [get]
 Gets a value indicating whether the potential visibility of this method or constructor is described by F:System.Reflection.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. More...
 
bool IsFamilyAndAssembly [get]
 Gets a value indicating whether the visibility of this method or constructor is described by F:System.Reflection.MethodAttributes.FamANDAssem; that is, the method or constructor can be called by derived classes, but only if they are in the same assembly. More...
 
bool IsFamilyOrAssembly [get]
 Gets a value indicating whether the potential visibility of this method or constructor is described by F:System.Reflection.MethodAttributes.FamORAssem; that is, the method or constructor can be called by derived classes wherever they are, and by classes in the same assembly. More...
 
bool IsStatic [get]
 Gets a value indicating whether the method is static. More...
 
bool IsFinal [get]
 Gets a value indicating whether this method is final. More...
 
bool IsVirtual [get]
 Gets a value indicating whether the method is virtual. More...
 
bool IsHideBySig [get]
 Gets a value indicating whether only a member of the same kind with exactly the same signature is hidden in the derived class. More...
 
bool IsAbstract [get]
 Gets a value indicating whether the method is abstract. More...
 
bool IsSpecialName [get]
 Gets a value indicating whether this method has a special name. More...
 
bool IsConstructor [get]
 Gets a value indicating whether the method is a constructor. More...
 
- Properties inherited from System.Reflection.MemberInfo
abstract MemberTypes MemberType [get]
 When overridden in a derived class, gets a T:System.Reflection.MemberTypes value indicating the type of the member — method, constructor, event, and so on. More...
 
abstract string Name [get]
 Gets the name of the current member. More...
 
abstract Type DeclaringType [get]
 Gets the class that declares this member. More...
 
abstract Type ReflectedType [get]
 Gets the class object that was used to obtain this instance of MemberInfo. More...
 
virtual IEnumerable< CustomAttributeDataCustomAttributes [get]
 Gets a collection that contains this member's custom attributes. More...
 
virtual int MetadataToken [get]
 Gets a value that identifies a metadata element. More...
 
virtual Module Module [get]
 Gets the module in which the type that declares the member represented by the current T:System.Reflection.MemberInfo is defined. More...
 
- Properties inherited from System.Runtime.InteropServices._MemberInfo
MemberTypes MemberType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.MemberType property. More...
 
string Name [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.Name property. More...
 
Type DeclaringType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.DeclaringType property. More...
 
Type ReflectedType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.ReflectedType property. More...
 
- Properties inherited from System.Runtime.InteropServices._MethodBase
MemberTypes MemberType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.MemberType property. More...
 
string Name [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.Name property. More...
 
Type DeclaringType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.DeclaringType property. More...
 
Type ReflectedType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.ReflectedType property. More...
 
RuntimeMethodHandle MethodHandle [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.MethodHandle property. More...
 
MethodAttributes Attributes [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.Attributes property. More...
 
CallingConventions CallingConvention [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.CallingConvention property. More...
 
bool IsPublic [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsPublic property. More...
 
bool IsPrivate [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsPrivate property. More...
 
bool IsFamily [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsFamily property. More...
 
bool IsAssembly [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsAssembly property. More...
 
bool IsFamilyAndAssembly [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsFamilyAndAssembly property. More...
 
bool IsFamilyOrAssembly [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsFamilyOrAssembly property. More...
 
bool IsStatic [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsStatic property. More...
 
bool IsFinal [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsFinal property. More...
 
bool IsVirtual [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsVirtual property. More...
 
bool IsHideBySig [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsHideBySig property. More...
 
bool IsAbstract [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsAbstract property. More...
 
bool IsSpecialName [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsSpecialName property. More...
 
bool IsConstructor [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MethodBase.IsConstructor property. More...
 

Detailed Description

Provides information about methods and constructors.

Definition at line 19 of file MethodBase.cs.

Member Function Documentation

◆ Equals()

override bool System.Reflection.MethodBase.Equals ( object  obj)

Returns a value that indicates whether this instance is equal to a specified object.

Parameters
objAn object to compare with this instance, or null.
Returns
true if obj equals the type and value of this instance; otherwise, false.

Implements System.Runtime.InteropServices._MethodBase.

Definition at line 546 of file MethodBase.cs.

◆ GetCurrentMethod()

static MethodBase System.Reflection.MethodBase.GetCurrentMethod ( )
static

Returns a MethodBase object representing the currently executing method.

Returns
M:System.Reflection.MethodBase.GetCurrentMethod is a static method that is called from within an executing method and that returns information about that method.A MethodBase object representing the currently executing method.
Exceptions
T:System.Reflection.TargetExceptionThis member was invoked with a late-binding mechanism.

Definition at line 493 of file MethodBase.cs.

◆ GetGenericArguments()

virtual Type [] System.Reflection.MethodBase.GetGenericArguments ( )
virtual

Returns an array of T:System.Type objects that represent the type arguments of a generic method or the type parameters of a generic method definition.

Returns
An array of T:System.Type objects that represent the type arguments of a generic method or the type parameters of a generic method definition. Returns an empty array if the current method is not a generic method.
Exceptions
T:System.NotSupportedExceptionThe current object is a T:System.Reflection.ConstructorInfo. Generic constructors are not supported in the .NET Framework version 2.0. This exception is the default behavior if this method is not overridden in a derived class.

Reimplemented in System.Reflection.Emit.MethodBuilder, and System.Reflection.MethodInfo.

Definition at line 599 of file MethodBase.cs.

◆ GetHashCode()

override int System.Reflection.MethodBase.GetHashCode ( )

Returns the hash code for this instance.

Returns
A 32-bit signed integer hash code.

Implements System.Runtime.InteropServices._MethodBase.

Definition at line 554 of file MethodBase.cs.

◆ GetMethodBody()

virtual MethodBody System.Reflection.MethodBase.GetMethodBody ( )
virtual

When overridden in a derived class, gets a T:System.Reflection.MethodBody object that provides access to the MSIL stream, local variables, and exceptions for the current method.

Returns
A T:System.Reflection.MethodBody object that provides access to the MSIL stream, local variables, and exceptions for the current method.
Exceptions
T:System.InvalidOperationExceptionThis method is invalid unless overridden in a derived class.

Definition at line 631 of file MethodBase.cs.

◆ GetMethodFromHandle() [1/2]

static MethodBase System.Reflection.MethodBase.GetMethodFromHandle ( RuntimeMethodHandle  handle)
static

Gets method information by using the method's internal metadata representation (handle).

Parameters
handleThe method's handle.
Returns
A MethodBase containing information about the method.
Exceptions
T:System.ArgumentExceptionhandle is invalid.

Definition at line 456 of file MethodBase.cs.

◆ GetMethodFromHandle() [2/2]

static MethodBase System.Reflection.MethodBase.GetMethodFromHandle ( RuntimeMethodHandle  handle,
RuntimeTypeHandle  declaringType 
)
static

Gets a T:System.Reflection.MethodBase object for the constructor or method represented by the specified handle, for the specified generic type.

Parameters
handleA handle to the internal metadata representation of a constructor or method.
declaringTypeA handle to the generic type that defines the constructor or method.
Returns
A T:System.Reflection.MethodBase object representing the method or constructor specified by handle , in the generic type specified by declaringType .
Exceptions
T:System.ArgumentExceptionhandle is invalid.

Definition at line 479 of file MethodBase.cs.

◆ GetMethodImplementationFlags()

abstract MethodImplAttributes System.Reflection.MethodBase.GetMethodImplementationFlags ( )
pure virtual

When overridden in a derived class, returns the T:System.Reflection.MethodImplAttributes flags.

Returns
The MethodImplAttributes flags.

Implements System.Runtime.InteropServices._MethodBase.

Implemented in System.Reflection.Emit.DynamicMethod, System.Reflection.Emit.MethodBuilder, and System.Reflection.Emit.ConstructorBuilder.

◆ GetParameters()

abstract ParameterInfo [] System.Reflection.MethodBase.GetParameters ( )
pure virtual

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

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

Implements System.Runtime.InteropServices._MethodBase.

Implemented in System.Reflection.Emit.DynamicMethod, System.Reflection.Emit.MethodBuilder, and System.Reflection.Emit.ConstructorBuilder.

◆ Invoke() [1/2]

abstract object System.Reflection.MethodBase.Invoke ( object  obj,
BindingFlags  invokeAttr,
Binder  binder,
object []  parameters,
CultureInfo  culture 
)
pure virtual

When overridden in a derived class, invokes the reflected method or constructor with the given parameters.

Parameters
objThe 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.
invokeAttrA bitmask that is a combination of 0 or more bit flags from T:System.Reflection.BindingFlags. If binder is null, this parameter is assigned the value F:System.Reflection.BindingFlags.Default; thus, whatever you pass in is ignored.
binderAn object that enables the binding, coercion of argument types, invocation of members, and retrieval of MemberInfo objects via reflection. If binder is null, the default binder is used.
parametersAn 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, this should be null.If the method or constructor represented by this instance takes a ByRef parameter, there is no special attribute required for that parameter in order to invoke the method or constructor using this function. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. For reference-type elements, this value is null. For value-type elements, this value is 0, 0.0, or false, depending on the specific element type.
cultureAn instance of CultureInfo used to govern the coercion of types. If this is null, the CultureInfo for the current thread is used. (This is necessary to convert a String that represents 1000 to a Double value, for example, since 1000 is represented differently by different cultures.)
Returns
An Object containing the return value of the invoked method, or null in the case of a constructor, or null if the method's return type is void. Before calling the method or constructor, Invoke checks to see if the user has access permission and verifies that the parameters are valid.Elements of the parameters array that represent parameters declared with the ref or out keyword may also be modified.
Exceptions
T:System.Reflection.TargetExceptionThe obj parameter is null and the method is not static.-or- The method is not declared or inherited by the class of obj . -or-A static constructor is invoked, and obj is neither null nor an instance of the class that declared the constructor.
T:System.ArgumentExceptionThe type of the parameters parameter does not match the signature of the method or constructor reflected by this instance.
T:System.Reflection.TargetParameterCountExceptionThe parameters array does not have the correct number of arguments.
T:System.Reflection.TargetInvocationExceptionThe invoked method or constructor throws an exception.
T:System.MethodAccessExceptionThe caller does not have permission to execute the method or constructor that is represented by the current instance.
T:System.InvalidOperationExceptionThe type that declares the method is an open generic type. That is, the P:System.Type.ContainsGenericParameters property returns true for the declaring type.

Implements System.Runtime.InteropServices._MethodBase.

Implemented in System.Reflection.Emit.DynamicMethod, System.Reflection.Emit.MethodBuilder, and System.Reflection.Emit.ConstructorBuilder.

◆ Invoke() [2/2]

object System.Reflection.MethodBase.Invoke ( object  obj,
object []  parameters 
)

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

Parameters
objThe 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.
parametersAn 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.If the method or constructor represented by this instance takes a ref parameter (ByRef in Visual Basic), no special attribute is required for that parameter in order to invoke the method or constructor using this function. Any object in this array that is not explicitly initialized with a value will contain the default value for that object type. For reference-type elements, this value is null. For value-type elements, this value is 0, 0.0, or false, depending on the specific element type.
Returns
An object containing the return value of the invoked method, or null in the case of a constructor.Elements of the parameters array that represent parameters declared with the ref or out keyword may also be modified.
Exceptions
T:System.Reflection.TargetExceptionIn the .NET for Windows Store apps or the Portable Class Library, catch T:System.Exception instead.The obj parameter is null and the method is not static.-or- The method is not declared or inherited by the class of obj . -or-A static constructor is invoked, and obj is neither null nor an instance of the class that declared the constructor.
T:System.ArgumentExceptionThe elements of the parameters array do not match the signature of the method or constructor reflected by this instance.
T:System.Reflection.TargetInvocationExceptionThe invoked method or constructor throws an exception. -or- The current instance is a T:System.Reflection.Emit.DynamicMethod that contains unverifiable code. See the "Verification" section in Remarks for T:System.Reflection.Emit.DynamicMethod.
T:System.Reflection.TargetParameterCountExceptionThe parameters array does not have the correct number of arguments.
T:System.MethodAccessExceptionIn the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.MemberAccessException, instead.The caller does not have permission to execute the method or constructor that is represented by the current instance.
T:System.InvalidOperationExceptionThe type that declares the method is an open generic type. That is, the P:System.Type.ContainsGenericParameters property returns true for the declaring type.
T:System.NotSupportedExceptionThe current instance is a T:System.Reflection.Emit.MethodBuilder.

Implements System.Runtime.InteropServices._MethodBase.

Definition at line 621 of file MethodBase.cs.

◆ operator !=()

static bool System.Reflection.MethodBase.operator != ( MethodBase  left,
MethodBase  right 
)
static

Indicates whether two T:System.Reflection.MethodBase objects are not equal.

Parameters
leftThe first object to compare.
rightThe second object to compare.
Returns
true if left is not equal to right ; otherwise, false.

Definition at line 536 of file MethodBase.cs.

◆ operator==()

static bool System.Reflection.MethodBase.operator== ( MethodBase  left,
MethodBase  right 
)
static

Indicates whether two T:System.Reflection.MethodBase objects are equal.

Parameters
leftThe first object to compare.
rightThe second object to compare.
Returns
true if left is equal to right ; otherwise, false.

Definition at line 505 of file MethodBase.cs.

Property Documentation

◆ Attributes

abstract MethodAttributes System.Reflection.MethodBase.Attributes
get

Gets the attributes associated with this method.

Returns
One of the T:System.Reflection.MethodAttributes values.

Definition at line 55 of file MethodBase.cs.

◆ CallingConvention

virtual CallingConventions System.Reflection.MethodBase.CallingConvention
get

Gets a value indicating the calling conventions for this method.

Returns
The T:System.Reflection.CallingConventions for this method.

Definition at line 64 of file MethodBase.cs.

◆ ContainsGenericParameters

virtual bool System.Reflection.MethodBase.ContainsGenericParameters
get

Gets a value indicating whether the generic method contains unassigned generic type parameters.

Returns
true if the current T:System.Reflection.MethodBase object represents a generic method that contains unassigned generic type parameters; otherwise, false.

Definition at line 90 of file MethodBase.cs.

◆ IsAbstract

bool System.Reflection.MethodBase.IsAbstract
get

Gets a value indicating whether the method is abstract.

Returns
true if the method is abstract; otherwise, false.

Definition at line 279 of file MethodBase.cs.

◆ IsAssembly

bool System.Reflection.MethodBase.IsAssembly
get

Gets a value indicating whether the potential visibility of this method or constructor is described by F:System.Reflection.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.

Returns
true if the visibility of this method or constructor is exactly described by F:System.Reflection.MethodAttributes.Assembly; otherwise, false.

Definition at line 188 of file MethodBase.cs.

◆ IsConstructor

bool System.Reflection.MethodBase.IsConstructor
get

Gets a value indicating whether the method is a constructor.

Returns
true if this method is a constructor represented by a T:System.Reflection.ConstructorInfo object (see note in Remarks about T:System.Reflection.Emit.ConstructorBuilder objects); otherwise, false.

Definition at line 306 of file MethodBase.cs.

◆ IsFamily

bool System.Reflection.MethodBase.IsFamily
get

Gets a value indicating whether the visibility of this method or constructor is described by F:System.Reflection.MethodAttributes.Family; that is, the method or constructor is visible only within its class and derived classes.

Returns
true if access to this method or constructor is exactly described by F:System.Reflection.MethodAttributes.Family; otherwise, false.

Definition at line 175 of file MethodBase.cs.

◆ IsFamilyAndAssembly

bool System.Reflection.MethodBase.IsFamilyAndAssembly
get

Gets a value indicating whether the visibility of this method or constructor is described by F:System.Reflection.MethodAttributes.FamANDAssem; that is, the method or constructor can be called by derived classes, but only if they are in the same assembly.

Returns
true if access to this method or constructor is exactly described by F:System.Reflection.MethodAttributes.FamANDAssem; otherwise, false.

Definition at line 201 of file MethodBase.cs.

◆ IsFamilyOrAssembly

bool System.Reflection.MethodBase.IsFamilyOrAssembly
get

Gets a value indicating whether the potential visibility of this method or constructor is described by F:System.Reflection.MethodAttributes.FamORAssem; that is, the method or constructor can be called by derived classes wherever they are, and by classes in the same assembly.

Returns
true if access to this method or constructor is exactly described by F:System.Reflection.MethodAttributes.FamORAssem; otherwise, false.

Definition at line 214 of file MethodBase.cs.

◆ IsFinal

bool System.Reflection.MethodBase.IsFinal
get

Gets a value indicating whether this method is final.

Returns
true if this method is final; otherwise, false.

Definition at line 240 of file MethodBase.cs.

◆ IsGenericMethod

virtual bool System.Reflection.MethodBase.IsGenericMethod
get

Gets a value indicating whether the method is generic.

Returns
true if the current T:System.Reflection.MethodBase represents a generic method; otherwise, false.

Definition at line 103 of file MethodBase.cs.

◆ IsGenericMethodDefinition

virtual bool System.Reflection.MethodBase.IsGenericMethodDefinition
get

Gets a value indicating whether the method is a generic method definition.

Returns
true if the current T:System.Reflection.MethodBase object represents the definition of a generic method; otherwise, false.

Definition at line 77 of file MethodBase.cs.

◆ IsHideBySig

bool System.Reflection.MethodBase.IsHideBySig
get

Gets a value indicating whether only a member of the same kind with exactly the same signature is hidden in the derived class.

Returns
true if the member is hidden by signature; otherwise, false.

Definition at line 266 of file MethodBase.cs.

◆ IsPrivate

bool System.Reflection.MethodBase.IsPrivate
get

Gets a value indicating whether this member is private.

Returns
true if access to this method is restricted to other members of the class itself; otherwise, false.

Definition at line 162 of file MethodBase.cs.

◆ IsPublic

bool System.Reflection.MethodBase.IsPublic
get

Gets a value indicating whether this is a public method.

Returns
true if this method is public; otherwise, false.

Definition at line 149 of file MethodBase.cs.

◆ IsSecurityCritical

virtual bool System.Reflection.MethodBase.IsSecurityCritical
get

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.

Returns
true if the current method or constructor is security-critical or security-safe-critical at the current trust level; false if it is transparent.

Definition at line 115 of file MethodBase.cs.

◆ IsSecuritySafeCritical

virtual bool System.Reflection.MethodBase.IsSecuritySafeCritical
get

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.

Returns
true if the method or constructor is security-safe-critical at the current trust level; false if it is security-critical or transparent.

Definition at line 126 of file MethodBase.cs.

◆ IsSecurityTransparent

virtual bool System.Reflection.MethodBase.IsSecurityTransparent
get

Gets a value that indicates whether the current method or constructor is transparent at the current trust level, and therefore cannot perform critical operations.

Returns
true if the method or constructor is security-transparent at the current trust level; otherwise, false.

Definition at line 137 of file MethodBase.cs.

◆ IsSpecialName

bool System.Reflection.MethodBase.IsSpecialName
get

Gets a value indicating whether this method has a special name.

Returns
true if this method has a special name; otherwise, false.

Definition at line 292 of file MethodBase.cs.

◆ IsStatic

bool System.Reflection.MethodBase.IsStatic
get

Gets a value indicating whether the method is static.

Returns
true if this method is static; otherwise, false.

Definition at line 227 of file MethodBase.cs.

◆ IsVirtual

bool System.Reflection.MethodBase.IsVirtual
get

Gets a value indicating whether the method is virtual.

Returns
true if this method is virtual; otherwise, false.

Definition at line 253 of file MethodBase.cs.

◆ MethodHandle

abstract RuntimeMethodHandle System.Reflection.MethodBase.MethodHandle
get

Gets a handle to the internal metadata representation of a method.

Returns
A T:System.RuntimeMethodHandle object.

Definition at line 46 of file MethodBase.cs.

◆ MethodImplementationFlags

virtual MethodImplAttributes System.Reflection.MethodBase.MethodImplementationFlags
get

Gets the T:System.Reflection.MethodImplAttributes flags that specify the attributes of a method implementation.

Returns
The method implementation flags.

Definition at line 34 of file MethodBase.cs.


The documentation for this class was generated from the following file: