Clean up some static initializers
[mono.git] / mcs / class / corlib / System.Reflection.Emit / FieldToken.cs
index c6953a88c661fcd31e66c81b9810d0d366af5574..85cc6599ee68be075f36f9a36fb4d9b325fe4abd 100644 (file)
@@ -33,22 +33,13 @@ 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 {
 
                internal int tokValue;
 
-               public static readonly FieldToken Empty;
-
-
-               static FieldToken ()
-               {
-                       Empty = new FieldToken ();
-               }
-
+               public static readonly FieldToken Empty = new FieldToken ();
 
                internal FieldToken (int val)
                {
@@ -70,12 +61,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