X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Reflection.Emit%2FMethodToken.cs;h=f3351e8874f4d0e298ba50146bae2667eaf0f7e8;hb=b55f4ec257741ce00eaf78029ea8c60a7a61f085;hp=8fc9455c082f450c82e7d3b1cf72d613aebe3fa6;hpb=234225d112c4b018b8d1796f4c06a15812137500;p=mono.git
diff --git a/mcs/class/corlib/System.Reflection.Emit/MethodToken.cs b/mcs/class/corlib/System.Reflection.Emit/MethodToken.cs
index 8fc9455c082..f3351e8874f 100644
--- a/mcs/class/corlib/System.Reflection.Emit/MethodToken.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/MethodToken.cs
@@ -25,6 +25,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Runtime.InteropServices;
namespace System.Reflection.Emit {
@@ -32,6 +33,9 @@ namespace System.Reflection.Emit {
///
/// Represents the Token returned by the metadata to represent a Method.
///
+#if NET_2_0
+ [ComVisible (true)]
+#endif
[Serializable]
public struct MethodToken {
@@ -51,8 +55,6 @@ namespace System.Reflection.Emit {
tokValue = val;
}
-
-
///
///
public override bool Equals (object obj)
@@ -67,6 +69,22 @@ namespace System.Reflection.Emit {
return res;
}
+#if NET_2_0
+ public bool Equals (MethodToken obj)
+ {
+ return (this.tokValue == obj.tokValue);
+ }
+
+ public static bool operator == (MethodToken a, MethodToken b)
+ {
+ return Equals (a, b);
+ }
+
+ public static bool operator != (MethodToken a, MethodToken b)
+ {
+ return !Equals (a, b);
+ }
+#endif
///
/// Tests whether the given object is an instance of