2010-06-22 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / corlib / System.Reflection.Emit / FieldToken.cs
index c6953a88c661fcd31e66c81b9810d0d366af5574..13295696f839d09bf48b1eefbc2f0a9149cd642b 100644 (file)
@@ -33,9 +33,7 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a Field.
        /// </summary>
-#if NET_2_0
        [ComVisible (true)]
-#endif
        [Serializable]
        public struct FieldToken {
 
@@ -70,12 +68,20 @@ namespace System.Reflection.Emit {
                }
 
 
-#if NET_2_0
                public bool Equals (FieldToken obj)
                {
                        return (this.tokValue == obj.tokValue);
                }
-#endif
+
+               public static bool operator == (FieldToken a, FieldToken b)
+               {
+                       return Equals (a, b);
+               }
+
+               public static bool operator != (FieldToken a, FieldToken b)
+               {
+                       return !Equals (a, b);
+               }
 
                /// <summary>
                ///  Tests whether the given object is an instance of