Merge pull request #948 from ermshiperete/bug-xamarin-2394
[mono.git] / mcs / class / corlib / System.Reflection.Emit / FieldToken.cs
index 782def479e399556b732fc16ca638ee5946c9b6a..7c7135ee17225f65d8a7cf1279ca2f15fb598938 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !FULL_AOT_RUNTIME
 using System.Runtime.InteropServices;
 
 namespace System.Reflection.Emit {
@@ -33,22 +34,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,7 +62,6 @@ namespace System.Reflection.Emit {
                }
 
 
-#if NET_2_0
                public bool Equals (FieldToken obj)
                {
                        return (this.tokValue == obj.tokValue);
@@ -85,7 +76,6 @@ namespace System.Reflection.Emit {
                {
                        return !Equals (a, b);
                }
-#endif
 
                /// <summary>
                ///  Tests whether the given object is an instance of
@@ -110,3 +100,4 @@ namespace System.Reflection.Emit {
 
 }
 
+#endif