2002-08-21 Dietmar Maurer <dietmar@ximian.com>
[mono.git] / mcs / class / corlib / System / Attribute.cs
index 4a09199629de2a3790a6fb55d43b44a78c35b387..cdad17adbdac63b8b412ed2a4afcc9f7ab42ff60 100644 (file)
@@ -13,6 +13,8 @@ using System.Globalization;
 \r
 namespace System {\r
 \r
+       [AttributeUsage(AttributeTargets.All)]\r
+       [Serializable]\r
        public abstract class Attribute {\r
 \r
                protected Attribute ()\r
@@ -308,7 +310,7 @@ namespace System {
 \r
                public override int GetHashCode ()\r
                {\r
-                       throw new NotImplementedException ();\r
+                       return ((Object) this).GetHashCode ();\r
                }\r
                \r
                public virtual bool IsDefaultAttribute ()\r
@@ -372,5 +374,13 @@ namespace System {
                        \r
                        return this.Equals (obj);\r
                }\r
+\r
+               public override bool Equals (object obj)\r
+               {\r
+                       if (obj == null || !(obj is Attribute))\r
+                               return false;\r
+\r
+                       return ((Attribute) obj) == this;\r
+               }\r
        }\r
 }\r