3 // Copyright (c) Microsoft Corporation. All rights reserved.
6 /*============================================================
8 ** Class: PropertyToken
10 ** <OWNER>Microsoft</OWNER>
13 ** Propertybuilder is for client to define properties for a class
16 ===========================================================*/
17 namespace System.Reflection.Emit {
20 using System.Reflection;
21 using System.Security.Permissions;
24 [System.Runtime.InteropServices.ComVisible(true)]
25 public struct PropertyToken {
27 public static readonly PropertyToken Empty = new PropertyToken();
29 internal int m_property;
31 internal PropertyToken(int str) {
36 get { return m_property; }
39 // Satisfy value class requirements
40 public override int GetHashCode()
45 // Satisfy value class requirements
46 public override bool Equals(Object obj)
48 if (obj is PropertyToken)
49 return Equals((PropertyToken)obj);
54 public bool Equals(PropertyToken obj)
56 return obj.m_property == m_property;
59 public static bool operator ==(PropertyToken a, PropertyToken b)
64 public static bool operator !=(PropertyToken a, PropertyToken b)