diff options
Diffstat (limited to 'src/mscorlib/src/System/Reflection/Emit/StringToken.cs')
-rw-r--r-- | src/mscorlib/src/System/Reflection/Emit/StringToken.cs | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/src/mscorlib/src/System/Reflection/Emit/StringToken.cs b/src/mscorlib/src/System/Reflection/Emit/StringToken.cs index 852225697c..1d90816fc6 100644 --- a/src/mscorlib/src/System/Reflection/Emit/StringToken.cs +++ b/src/mscorlib/src/System/Reflection/Emit/StringToken.cs @@ -12,36 +12,39 @@ ** ** ===========================================================*/ -namespace System.Reflection.Emit { - - using System; - using System.Reflection; +using System; +using System.Reflection; + +namespace System.Reflection.Emit +{ [Serializable] - public struct StringToken { - + public struct StringToken + { internal int m_string; - + //public StringToken() { // m_string=0; //} - - internal StringToken(int str) { - m_string=str; + + internal StringToken(int str) + { + m_string = str; } - + // Returns the metadata token for this particular string. // Generated by a call to Module.GetStringConstant(). // - public int Token { + public int Token + { get { return m_string; } } - + public override int GetHashCode() { return m_string; } - + public override bool Equals(Object obj) { if (obj is StringToken) @@ -49,29 +52,20 @@ namespace System.Reflection.Emit { else return false; } - + public bool Equals(StringToken obj) { return obj.m_string == m_string; } - + public static bool operator ==(StringToken a, StringToken b) { return a.Equals(b); } - + public static bool operator !=(StringToken a, StringToken b) { return !(a == b); } - } - - - - - - - - } |