mscorlib(4.0.0.0) API with additions
MethodInfo.cs
3 
4 namespace System.Reflection
5 {
8  [ClassInterface(ClassInterfaceType.None)]
9  [ComDefaultInterface(typeof(_MethodInfo))]
10  [ComVisible(true)]
11  [__DynamicallyInvokable]
12  [PermissionSet(SecurityAction.InheritanceDemand, Name = "FullTrust")]
13  public abstract class MethodInfo : MethodBase, _MethodInfo
14  {
17  public override MemberTypes MemberType => MemberTypes.Method;
18 
21  [__DynamicallyInvokable]
22  public virtual Type ReturnType
23  {
24  [__DynamicallyInvokable]
25  get
26  {
27  throw new NotImplementedException();
28  }
29  }
30 
34  [__DynamicallyInvokable]
35  public virtual ParameterInfo ReturnParameter
36  {
37  [__DynamicallyInvokable]
38  get
39  {
40  throw new NotImplementedException();
41  }
42  }
43 
47  {
48  get;
49  }
50 
56  [__DynamicallyInvokable]
57  public static bool operator ==(MethodInfo left, MethodInfo right)
58  {
59  if ((object)left == right)
60  {
61  return true;
62  }
63  if ((object)left == null || (object)right == null || left is RuntimeMethodInfo || right is RuntimeMethodInfo)
64  {
65  return false;
66  }
67  return left.Equals(right);
68  }
69 
75  [__DynamicallyInvokable]
76  public static bool operator !=(MethodInfo left, MethodInfo right)
77  {
78  return !(left == right);
79  }
80 
85  [__DynamicallyInvokable]
86  public override bool Equals(object obj)
87  {
88  return base.Equals(obj);
89  }
90 
93  [__DynamicallyInvokable]
94  public override int GetHashCode()
95  {
96  return base.GetHashCode();
97  }
98 
101  [__DynamicallyInvokable]
102  public abstract MethodInfo GetBaseDefinition();
103 
107  [ComVisible(true)]
108  [__DynamicallyInvokable]
109  public override Type[] GetGenericArguments()
110  {
111  throw new NotSupportedException(Environment.GetResourceString("NotSupported_SubclassOverride"));
112  }
113 
118  [ComVisible(true)]
119  [__DynamicallyInvokable]
121  {
122  throw new NotSupportedException(Environment.GetResourceString("NotSupported_SubclassOverride"));
123  }
124 
133  [__DynamicallyInvokable]
134  public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments)
135  {
136  throw new NotSupportedException(Environment.GetResourceString("NotSupported_SubclassOverride"));
137  }
138 
142  [__DynamicallyInvokable]
143  public virtual Delegate CreateDelegate(Type delegateType)
144  {
145  throw new NotSupportedException(Environment.GetResourceString("NotSupported_SubclassOverride"));
146  }
147 
152  [__DynamicallyInvokable]
153  public virtual Delegate CreateDelegate(Type delegateType, object target)
154  {
155  throw new NotSupportedException(Environment.GetResourceString("NotSupported_SubclassOverride"));
156  }
157 
161  {
162  return GetType();
163  }
164 
168  void _MethodInfo.GetTypeInfoCount(out uint pcTInfo)
169  {
170  throw new NotImplementedException();
171  }
172 
178  void _MethodInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo)
179  {
180  throw new NotImplementedException();
181  }
182 
190  void _MethodInfo.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
191  {
192  throw new NotImplementedException();
193  }
194 
205  void _MethodInfo.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
206  {
207  throw new NotImplementedException();
208  }
209  }
210 }
Discovers the attributes of a parameter and provides access to parameter metadata.
override int GetHashCode()
Returns the hash code for this instance.
Definition: MethodInfo.cs:94
abstract MethodInfo GetBaseDefinition()
When overridden in a derived class, returns the T:System.Reflection.MethodInfo object for the method ...
virtual MethodInfo GetGenericMethodDefinition()
Returns a T:System.Reflection.MethodInfo object that represents a generic method definition from whic...
Definition: MethodInfo.cs:120
override bool Equals(object obj)
Returns a value that indicates whether this instance is equal to a specified object.
Definition: MethodInfo.cs:86
Discovers the attributes of a method and provides access to method metadata.
Definition: MethodInfo.cs:13
Exposes the public members of the T:System.Reflection.MethodInfo class to unmanaged code.
Definition: _MethodInfo.cs:12
Definition: __Canon.cs:3
virtual Type ReturnType
Gets the return type of this method.
Definition: MethodInfo.cs:23
void GetTypeInfoCount(out uint pcTInfo)
Retrieves the number of type information interfaces that an object provides (either 0 or 1).
virtual MethodInfo MakeGenericMethod(params Type[] typeArguments)
Substitutes the elements of an array of types for the type parameters of the current generic method d...
Definition: MethodInfo.cs:134
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...
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.
SecurityAction
Specifies the security actions that can be performed using declarative security.
Provides information about, and means to manipulate, the current environment and platform....
Definition: Environment.cs:21
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.
virtual ParameterInfo ReturnParameter
Gets a T:System.Reflection.ParameterInfo object that contains information about the return type of th...
Definition: MethodInfo.cs:36
virtual Delegate CreateDelegate(Type delegateType)
Creates a delegate of the specified type from this method.
Definition: MethodInfo.cs:143
static bool operator !=(MethodInfo left, MethodInfo right)
Indicates whether two T:System.Reflection.MethodInfo objects are not equal.
Definition: MethodInfo.cs:76
Represents a delegate, which is a data structure that refers to a static method or to a class instanc...
Definition: Delegate.cs:15
Represents type declarations: class types, interface types, array types, value types,...
Definition: Type.cs:18
override MemberTypes MemberType
Gets a T:System.Reflection.MemberTypes value indicating that this member is a method.
Definition: MethodInfo.cs:17
Provides information about methods and constructors.
Definition: MethodBase.cs:19
abstract ICustomAttributeProvider ReturnTypeCustomAttributes
Gets the custom attributes for the return type.
Definition: MethodInfo.cs:47
override Type [] GetGenericArguments()
Returns an array of T:System.Type objects that represent the type arguments of a generic method or th...
Definition: MethodInfo.cs:109
virtual Delegate CreateDelegate(Type delegateType, object target)
Creates a delegate of the specified type with the specified target from this method.
Definition: MethodInfo.cs:153
static bool operator==(MethodInfo left, MethodInfo right)
Indicates whether two T:System.Reflection.MethodInfo objects are equal.
Definition: MethodInfo.cs:57
Specifies that the class can be serialized.
ClassInterfaceType
Identifies the type of class interface that is generated for a class.
Specifies that the parameter is an input parameter.
new Type GetType()
Provides COM objects with version-independent access to the M:System.Type.GetType method.
The exception that is thrown when an invoked method is not supported, or when there is an attempt to ...
MemberTypes
Marks each type of member that is defined as a derived class of T:System.Reflection....
Definition: MemberTypes.cs:9
The exception that is thrown when a requested method or operation is not implemented.
Provides custom attributes for reflection objects that support them.