* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / corlib / System.Reflection.Emit / MethodToken.cs
index 8fc9455c082f450c82e7d3b1cf72d613aebe3fa6..d0df92699d31394c39fc364dd1a95963acb71abe 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
 
@@ -32,6 +33,9 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a Method.
        /// </summary>
+#if NET_2_0
+       [ComVisible (true)]
+#endif
        [Serializable]
        public struct MethodToken {
 
@@ -51,8 +55,6 @@ namespace System.Reflection.Emit {
                        tokValue = val;
                }
 
-
-
                /// <summary>
                /// </summary>
                public override bool Equals (object obj)
@@ -67,6 +69,12 @@ namespace System.Reflection.Emit {
                        return res;
                }
 
+#if NET_2_0
+               public bool Equals (MethodToken obj)
+               {
+                       return (this.tokValue == obj.tokValue);
+               }
+#endif
 
                /// <summary>
                ///  Tests whether the given object is an instance of