2010-03-12 Jb Evain <jbevain@novell.com>
[mono.git] / mcs / class / corlib / System.Reflection.Emit / TypeToken.cs
index 64af39fcedc54832ce24036bd7031f4eb5731913..a3690df96a3b27bdb38a7518bb63981aa97019b3 100644 (file)
@@ -34,9 +34,7 @@ namespace System.Reflection.Emit {
        ///  Represents the Token returned by the metadata to represent a Type.
        /// </summary>
        [Serializable]
-#if NET_2_0
        [ComVisible (true)]
-#endif
        public struct TypeToken {
 
                internal int tokValue;
@@ -69,12 +67,20 @@ namespace System.Reflection.Emit {
                        return res;
                }
 
-#if NET_2_0
                public bool Equals (TypeToken obj)
                {
                        return (this.tokValue == obj.tokValue);
                }
-#endif
+
+               public static bool operator == (TypeToken a, TypeToken b)
+               {
+                       return Equals (a, b);
+               }
+
+               public static bool operator != (TypeToken a, TypeToken b)
+               {
+                       return !Equals (a, b);
+               }
 
                /// <summary>
                ///  Tests whether the given object is an instance of