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