// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !FULL_AOT_RUNTIME
using System.Runtime.InteropServices;
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)
{
tokValue = val;
}
-
-
/// <summary>
/// </summary>
public override bool Equals (object obj)
}
+ public bool Equals (FieldToken obj)
+ {
+ return (this.tokValue == obj.tokValue);
+ }
+
+ public static bool operator == (FieldToken a, FieldToken b)
+ {
+ return Equals (a, b);
+ }
+
+ public static bool operator != (FieldToken a, FieldToken b)
+ {
+ return !Equals (a, b);
+ }
+
/// <summary>
/// Tests whether the given object is an instance of
/// FieldToken and has the same token value.
}
+#endif