using System;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit
{
/// Represents a token that represents a string.
// Token: 0x0200021A RID: 538
[ComVisible(true)]
[Serializable]
public struct StringToken
{
// Token: 0x06001C50 RID: 7248 RVA: 0x0006A9F8 File Offset: 0x00068BF8
internal StringToken(int val)
{
this.tokValue = val;
}
/// Checks if the given object is an instance of StringToken and is equal to this instance.
/// true if is an instance of StringToken and is equal to this object; otherwise, false.
/// The object to compare with this StringToken.
// Token: 0x06001C52 RID: 7250 RVA: 0x0006AA08 File Offset: 0x00068C08
public override bool Equals(object obj)
{
bool flag = obj is StringToken;
if (flag)
{
StringToken stringToken = (StringToken)obj;
flag = this.tokValue == stringToken.tokValue;
}
return flag;
}
/// Indicates whether the current instance is equal to the specified .
/// true if the value of is equal to the value of the current instance; otherwise, false.
/// The to compare to the current instance.
// Token: 0x06001C53 RID: 7251 RVA: 0x0006AA40 File Offset: 0x00068C40
public bool Equals(StringToken obj)
{
return this.tokValue == obj.tokValue;
}
/// Returns the hash code for this string.
/// Returns the underlying string token.
// Token: 0x06001C54 RID: 7252 RVA: 0x0006AA54 File Offset: 0x00068C54
public override int GetHashCode()
{
return this.tokValue;
}
/// Retrieves the metadata token for this string.
/// Read-only. Retrieves the metadata token of this string.
// Token: 0x17000514 RID: 1300
// (get) Token: 0x06001C55 RID: 7253 RVA: 0x0006AA5C File Offset: 0x00068C5C
public int Token
{
get
{
return this.tokValue;
}
}
/// Indicates whether two structures are equal.
/// true if is equal to ; otherwise, false.
/// The to compare to .
/// The to compare to .
// Token: 0x06001C56 RID: 7254 RVA: 0x0006AA64 File Offset: 0x00068C64
public static bool operator ==(StringToken a, StringToken b)
{
return object.Equals(a, b);
}
/// Indicates whether two structures are not equal.
/// true if is not equal to ; otherwise, false.
/// The to compare to .
/// The to compare to .
// Token: 0x06001C57 RID: 7255 RVA: 0x0006AA78 File Offset: 0x00068C78
public static bool operator !=(StringToken a, StringToken b)
{
return !object.Equals(a, b);
}
// Token: 0x040009AB RID: 2475
internal int tokValue;
}
}