2008-12-08 Ivan N. Zlatev <contact@i-nz.net>
[mono.git] / mcs / class / corlib / System.Reflection.Emit / SignatureToken.cs
index 624891f1ae38f4e85c88a38bcb765b9b86c69eaf..59592c27ff7bfe86894a83a9c2fe323c95a5cb0d 100644 (file)
@@ -35,8 +35,9 @@ namespace System.Reflection.Emit {
        /// </summary>
 #if NET_2_0
        [ComVisible (true)]
-#endif
+#else
        [Serializable]
+#endif
        public struct SignatureToken {
 
                internal int tokValue;
@@ -55,8 +56,6 @@ namespace System.Reflection.Emit {
                        tokValue = val;
                }
 
-
-
                /// <summary>
                /// </summary>
                public override bool Equals (object obj)
@@ -71,6 +70,22 @@ namespace System.Reflection.Emit {
                        return res;
                }
 
+#if NET_2_0
+               public bool Equals (SignatureToken obj)
+               {
+                       return (this.tokValue == obj.tokValue);
+               }
+
+               public static bool operator == (SignatureToken a, SignatureToken b)
+               {
+                       return Equals (a, b);
+               }
+
+               public static bool operator != (SignatureToken a, SignatureToken b)
+               {
+                       return !Equals (a, b);
+               }
+#endif
 
                /// <summary>
                ///  Tests whether the given object is an instance of