17 [__DynamicallyInvokable]
21 internal virtual bool IsDynamicallyInvokable
23 [__DynamicallyInvokable]
32 [__DynamicallyInvokable]
35 [__DynamicallyInvokable]
44 [__DynamicallyInvokable]
47 [__DynamicallyInvokable]
53 [__DynamicallyInvokable]
56 [__DynamicallyInvokable]
62 [__DynamicallyInvokable]
65 [__DynamicallyInvokable]
75 [__DynamicallyInvokable]
78 [__DynamicallyInvokable]
88 [__DynamicallyInvokable]
91 [__DynamicallyInvokable]
101 [__DynamicallyInvokable]
104 [__DynamicallyInvokable]
147 [__DynamicallyInvokable]
150 [__DynamicallyInvokable]
160 [__DynamicallyInvokable]
163 [__DynamicallyInvokable]
173 [__DynamicallyInvokable]
176 [__DynamicallyInvokable]
186 [__DynamicallyInvokable]
189 [__DynamicallyInvokable]
199 [__DynamicallyInvokable]
202 [__DynamicallyInvokable]
212 [__DynamicallyInvokable]
215 [__DynamicallyInvokable]
225 [__DynamicallyInvokable]
228 [__DynamicallyInvokable]
238 [__DynamicallyInvokable]
241 [__DynamicallyInvokable]
251 [__DynamicallyInvokable]
254 [__DynamicallyInvokable]
264 [__DynamicallyInvokable]
267 [__DynamicallyInvokable]
277 [__DynamicallyInvokable]
280 [__DynamicallyInvokable]
290 [__DynamicallyInvokable]
293 [__DynamicallyInvokable]
304 [__DynamicallyInvokable]
307 [__DynamicallyInvokable]
318 internal string FullName => $
"{DeclaringType.FullName}.{FormatNameAndSig()}";
455 [__DynamicallyInvokable]
458 if (handle.IsNullHandle())
462 MethodBase methodBase = RuntimeType.GetMethodBase(handle.GetMethodInfo());
478 [__DynamicallyInvokable]
481 if (handle.IsNullHandle())
485 return RuntimeType.GetMethodBase(declaringType.GetRuntimeType(), handle.GetMethodInfo());
495 StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
496 return RuntimeMethodInfo.InternalGetCurrentMethod(ref stackMark);
504 [__DynamicallyInvokable]
507 if ((
object)left == right)
511 if ((
object)left ==
null || (
object)right ==
null)
519 return left2 == right2;
525 return left3 == right3;
535 [__DynamicallyInvokable]
538 return !(left == right);
545 [__DynamicallyInvokable]
548 return base.Equals(obj);
553 [__DynamicallyInvokable]
556 return base.GetHashCode();
560 private IntPtr GetMethodDesc()
565 internal virtual ParameterInfo[] GetParametersNoCopy()
572 [__DynamicallyInvokable]
598 [__DynamicallyInvokable]
618 [DebuggerStepThrough]
620 [__DynamicallyInvokable]
621 public object Invoke(
object obj,
object[] parameters)
629 [SecuritySafeCritical]
636 internal static string ConstructParameters(
Type[] parameterTypes,
CallingConventions callingConvention,
bool serialization)
640 foreach (
Type type
in parameterTypes)
642 stringBuilder.
Append(value);
643 string text = type.FormatTypeName(serialization);
644 if (type.
IsByRef && !serialization)
646 stringBuilder.
Append(text.TrimEnd(
'&'));
647 stringBuilder.
Append(
" ByRef");
651 stringBuilder.
Append(text);
657 stringBuilder.
Append(value);
658 stringBuilder.
Append(
"...");
663 internal string FormatNameAndSig()
665 return FormatNameAndSig(serialization:
false);
668 internal virtual string FormatNameAndSig(
bool serialization)
671 stringBuilder.
Append(
"(");
673 stringBuilder.
Append(
")");
677 internal virtual Type[] GetParameterTypes()
679 ParameterInfo[] parametersNoCopy = GetParametersNoCopy();
680 Type[] array =
new Type[parametersNoCopy.Length];
681 for (
int i = 0; i < parametersNoCopy.Length; i++)
683 array[i] = parametersNoCopy[i].ParameterType;
688 [SecuritySafeCritical]
689 internal object[] CheckArguments(
object[] parameters, Binder binder,
BindingFlags invokeAttr,
CultureInfo culture, Signature sig)
691 object[] array =
new object[parameters.Length];
692 ParameterInfo[] array2 =
null;
693 for (
int i = 0; i < parameters.Length; i++)
695 object obj = parameters[i];
696 RuntimeType runtimeType = sig.Arguments[i];
697 if (obj ==
Type.Missing)
701 array2 = GetParametersNoCopy();
703 if (array2[i].DefaultValue ==
DBNull.Value)
705 throw new ArgumentException(Environment.GetResourceString(
"Arg_VarMissNull"),
"parameters");
707 obj = array2[i].DefaultValue;
709 array[i] = runtimeType.CheckValue(obj, binder, culture, invokeAttr);
726 throw new NotImplementedException();
736 throw new NotImplementedException();
748 throw new NotImplementedException();
761 void _MethodBase.
Invoke(uint dispIdMember, [
In] ref Guid riid, uint lcid,
short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
763 throw new NotImplementedException();
Obtains information about the attributes of a member and provides access to member metadata.
virtual Type GetGenericTypeDefinition()
Returns a T:System.Type object that represents a generic type definition from which the current gener...
MethodAttributes
Specifies flags for method attributes. These flags are defined in the corhdr.h file.
bool IsConstructor
Gets a value indicating whether the method is a constructor.
override bool Equals(object obj)
Returns a value that indicates whether this instance is equal to a specified object.
bool IsHideBySig
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
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 parame...
ReflectionPermissionFlag
Specifies the permitted use of the N:System.Reflection and N:System.Reflection.Emit namespaces.
static MethodBase GetCurrentMethod()
Returns a MethodBase object representing the currently executing method.
abstract Type DeclaringType
Gets the class that declares this member.
unsafe override string ToString()
Converts the value of this instance to a T:System.String.
MethodImplAttributes
Specifies flags for the attributes of a method implementation.
Discovers the attributes of a method and provides access to method metadata.
bool IsHideBySig
Gets a value indicating whether only a member of the same kind with exactly the same signature is hid...
bool IsVirtual
Gets a value indicating whether the method is virtual.
virtual bool ContainsGenericParameters
Gets a value indicating whether the generic method contains unassigned generic type parameters.
Discovers the attributes of a class constructor and provides access to constructor metadata.
BindingFlags
Specifies flags that control binding and the way in which the search for members and types is conduct...
abstract RuntimeMethodHandle MethodHandle
Gets a handle to the internal metadata representation of a method.
bool IsAbstract
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
bool IsFamily
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
CallingConvention
Specifies the calling convention required to call methods implemented in unmanaged code.
void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
Provides access to properties and methods exposed by an object.
Represents a type using an internal metadata token.
bool IsFamilyAndAssembly
Gets a value indicating whether the visibility of this method or constructor is described by F:System...
virtual bool IsGenericType
Gets a value indicating whether the current type is a generic type.
virtual bool IsSecurityCritical
Gets a value that indicates whether the current method or constructor is security-critical or securit...
abstract MethodAttributes Attributes
Gets the attributes associated with this method.
void GetTypeInfoCount(out uint pcTInfo)
Retrieves the number of type information interfaces that an object provides (either 0 or 1).
IntPtr Value
Gets the value of this instance.
bool IsStatic
Gets a value indicating whether the method is static.
object Invoke(object obj, object[] parameters)
Invokes the method or constructor represented by the current instance, using the specified parameters...
static bool operator==(MethodBase left, MethodBase right)
Indicates whether two T:System.Reflection.MethodBase objects are equal.
bool IsAbstract
Gets a value indicating whether the method is abstract.
Provides access to the metadata and MSIL for the body of a method.
bool IsFinal
Gets a value indicating whether this method is final.
CallingConventions
Defines the valid calling conventions for a method.
SecurityAction
Specifies the security actions that can be performed using declarative security.
void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
Maps a set of names to a corresponding set of dispatch identifiers.
Provides information about, and means to manipulate, the current environment and platform....
T:System.RuntimeMethodHandle is a handle to the internal metadata representation of a method.
bool IsPublic
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
StringBuilder Append(char value, int repeatCount)
Appends a specified number of copies of the string representation of a Unicode character to this inst...
Represents a collection that can contain many different types of permissions.
virtual bool IsGenericMethod
Gets a value indicating whether the method is generic.
bool IsSpecialName
Gets a value indicating whether this method has a special name.
virtual bool IsSecurityTransparent
Gets a value that indicates whether the current method or constructor is transparent at the current t...
override int GetHashCode()
Returns the hash code for this instance.
virtual bool IsGenericMethodDefinition
Gets a value indicating whether the method is a generic method definition.
bool IsPrivate
Gets a value indicating whether this member is private.
static MethodBase GetMethodFromHandle(RuntimeMethodHandle handle)
Gets method information by using the method's internal metadata representation (handle).
bool IsVirtual
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
bool IsAssembly
Gets a value indicating whether the potential visibility of this method or constructor is described b...
A database null (column) value.
A platform-specific type that is used to represent a pointer or a handle.
static MethodBase GetMethodFromHandle(RuntimeMethodHandle handle, RuntimeTypeHandle declaringType)
Gets a T:System.Reflection.MethodBase object for the constructor or method represented by the specifi...
bool IsFamilyOrAssembly
Gets a value indicating whether the potential visibility of this method or constructor is described b...
bool IsAssembly
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
bool IsSpecialName
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
virtual MethodImplAttributes MethodImplementationFlags
Gets the T:System.Reflection.MethodImplAttributes flags that specify the attributes of a method imple...
Represents type declarations: class types, interface types, array types, value types,...
Provides information about methods and constructors.
bool IsPublic
Gets a value indicating whether this is a public method.
MethodImplOptions
Defines the details of how a method is implemented.
void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo)
Retrieves the type information for an object, which can be used to get the type information for an in...
bool IsStatic
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
abstract string Name
Gets the name of the current member.
virtual MethodBody GetMethodBody()
When overridden in a derived class, gets a T:System.Reflection.MethodBody object that provides access...
bool IsPrivate
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
Represents a mutable string of characters. This class cannot be inherited.To browse the ....
bool IsFamilyAndAssembly
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
new Type GetType()
Provides COM objects with version-independent access to the M:System.Type.GetType method.
static CultureInfo CurrentCulture
Gets or sets the T:System.Globalization.CultureInfo object that represents the culture used by the cu...
The exception that is thrown when one of the arguments provided to a method is not valid.
virtual bool IsSecuritySafeCritical
Gets a value that indicates whether the current method or constructor is security-safe-critical at th...
static bool operator !=(MethodBase left, MethodBase right)
Indicates whether two T:System.Reflection.MethodBase objects are not equal.
Specifies that the class can be serialized.
The exception that is thrown when a method call is invalid for the object's current state.
ClassInterfaceType
Identifies the type of class interface that is generated for a class.
Specifies that the parameter is an input parameter.
virtual Type [] GetGenericArguments()
Returns an array of T:System.Type objects that represent the type arguments of a generic method or th...
Provides information about a specific culture (called a locale for unmanaged code development)....
The exception that is thrown when an invoked method is not supported, or when there is an attempt to ...
bool IsByRef
Gets a value indicating whether the T:System.Type is passed by reference.
Exposes the public members of the T:System.Reflection.MethodBase class to unmanaged code.
Controls access to non-public types and members through the N:System.Reflection APIs....
abstract MethodImplAttributes GetMethodImplementationFlags()
When overridden in a derived class, returns the T:System.Reflection.MethodImplAttributes flags.
The exception that is thrown when a requested method or operation is not implemented.
bool IsFamilyOrAssembly
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
abstract ParameterInfo [] GetParameters()
When overridden in a derived class, gets the parameters of the specified method or constructor.
bool IsFamily
Gets a value indicating whether the visibility of this method or constructor is described by F:System...
bool IsFinal
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....
bool IsConstructor
Provides COM objects with version-independent access to the P:System.Reflection.MethodBase....