mscorlib(4.0.0.0) API with additions
MethodToken.cs
2 
4 {
7  [ComVisible(true)]
8  public struct MethodToken
9  {
11  public static readonly MethodToken Empty;
12 
13  internal int m_method;
14 
17  public int Token => m_method;
18 
19  internal MethodToken(int str)
20  {
21  m_method = str;
22  }
23 
26  public override int GetHashCode()
27  {
28  return m_method;
29  }
30 
35  public override bool Equals(object obj)
36  {
37  if (obj is MethodToken)
38  {
39  return Equals((MethodToken)obj);
40  }
41  return false;
42  }
43 
48  public bool Equals(MethodToken obj)
49  {
50  return obj.m_method == m_method;
51  }
52 
58  public static bool operator ==(MethodToken a, MethodToken b)
59  {
60  return a.Equals(b);
61  }
62 
68  public static bool operator !=(MethodToken a, MethodToken b)
69  {
70  return !(a == b);
71  }
72  }
73 }
static bool operator==(MethodToken a, MethodToken b)
Indicates whether two T:System.Reflection.Emit.MethodToken structures are equal.
Definition: MethodToken.cs:58
override bool Equals(object obj)
Tests whether the given object is equal to this MethodToken object.
Definition: MethodToken.cs:35
The MethodToken struct is an object representation of a token that represents a method.
Definition: MethodToken.cs:8
Definition: __Canon.cs:3
override int GetHashCode()
Returns the generated hash code for this method.
Definition: MethodToken.cs:26
static readonly MethodToken Empty
The default MethodToken with P:System.Reflection.Emit.MethodToken.Token value 0.
Definition: MethodToken.cs:11
static bool operator !=(MethodToken a, MethodToken b)
Indicates whether two T:System.Reflection.Emit.MethodToken structures are not equal.
Definition: MethodToken.cs:68
int Token
Returns the metadata token for this method.
Definition: MethodToken.cs:17
Specifies that the class can be serialized.
bool Equals(MethodToken obj)
Indicates whether the current instance is equal to the specified T:System.Reflection....
Definition: MethodToken.cs:48