Avoid random failure in CountdownEvent unit test
[mono.git] / mcs / class / corlib / System.Reflection.Emit / MethodToken.cs
index d0df92699d31394c39fc364dd1a95963acb71abe..a4f1b916e141909ffd0f282e8816a1717faed9d5 100644 (file)
@@ -33,9 +33,7 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a Method.
        /// </summary>
-#if NET_2_0
        [ComVisible (true)]
-#endif
        [Serializable]
        public struct MethodToken {
 
@@ -69,12 +67,20 @@ namespace System.Reflection.Emit {
                        return res;
                }
 
-#if NET_2_0
                public bool Equals (MethodToken obj)
                {
                        return (this.tokValue == obj.tokValue);
                }
-#endif
+
+               public static bool operator == (MethodToken a, MethodToken b)
+               {
+                       return Equals (a, b);
+               }
+
+               public static bool operator != (MethodToken a, MethodToken b)
+               {
+                       return !Equals (a, b);
+               }
 
                /// <summary>
                ///  Tests whether the given object is an instance of