using System.Runtime.InteropServices;
using System.Globalization;
namespace System
{
[StructLayout(LayoutKind.Sequential),Serializable]
[ComVisible(true)]
public struct Int64:System.IComparable,System.IFormattable,System.IConvertible,System.IComparable<long>,System.IEquatable<long>
{
public const long MaxValue = 0x7FFFFFFFFFFFFFFF;
public const long MinValue = (long)0x8000000000000000;
internal long m_value;
public new virtual sealed int CompareTo(object @value)
{
// 代码大小 52 (0x34)
//.maxstack 2
//.locals init (int64 V_0)
//IL_0000: ldarg.1
//IL_0001: brtrue.s IL_0005
//IL_0003: ldc.i4.1
//IL_0004: ret
//IL_0005: ldarg.1
//IL_0006: isinst System.Int64
//IL_000b: brfalse.s IL_0024
//IL_000d: ldarg.1
//IL_000e: unbox.any System.Int64
//IL_0013: stloc.0
//IL_0014: ldarg.0
//IL_0015: ldind.i8
//IL_0016: ldloc.0
//IL_0017: bge.s IL_001b
//IL_0019: ldc.i4.m1
//IL_001a: ret
//IL_001b: ldarg.0
//IL_001c: ldind.i8
//IL_001d: ldloc.0
//IL_001e: ble.s IL_0022
//IL_0020: ldc.i4.1
//IL_0021: ret
//IL_0022: ldc.i4.0
//IL_0023: ret
//IL_0024: ldstr "Arg_MustBeInt64"
//IL_0029: call string System.Environment::GetResourceString(string)
//IL_002e: newobj instance void System.ArgumentException::.ctor(string)
//IL_0033: throw
long V_0;
if (@value == null)
{
return 1;
}
else
{
if (@value as long == null)
{
throw new System.ArgumentException(System.Environment.GetResourceString("Arg_MustBeInt64"));
}
else
{
V_0 = (long)@value;
if (this >= V_0)
{
if (this <= V_0)
{
return 0;
}
else
{
return 1;
}
}
else
{
return -1;
}
}
}
}
public new virtual sealed int CompareTo(long @value)
{
// 代码大小 16 (0x10)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: ldarg.1
//IL_0003: bge.s IL_0007
//IL_0005: ldc.i4.m1
//IL_0006: ret
//IL_0007: ldarg.0
//IL_0008: ldind.i8
//IL_0009: ldarg.1
//IL_000a: ble.s IL_000e
//IL_000c: ldc.i4.1
//IL_000d: ret
//IL_000e: ldc.i4.0
//IL_000f: ret
if (this >= @value)
{
if (this <= @value)
{
return 0;
}
else
{
return 1;
}
}
else
{
return -1;
}
}
public override bool Equals(object obj)
{
// 代码大小 21 (0x15)
//.maxstack 8
//IL_0000: ldarg.1
//IL_0001: isinst System.Int64
//IL_0006: brtrue.s IL_000a
//IL_0008: ldc.i4.0
//IL_0009: ret
//IL_000a: ldarg.0
//IL_000b: ldind.i8
//IL_000c: ldarg.1
//IL_000d: unbox.any System.Int64
//IL_0012: ceq
//IL_0014: ret
if (obj as long == null)
{
return false;
}
else
{
return this == (long)obj;
}
}
public new virtual sealed bool Equals(long obj)
{
// 代码大小 6 (0x6)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: ldarg.1
//IL_0003: ceq
//IL_0005: ret
return this == obj;
}
public virtual int GetHashCode()
{
// 代码大小 11 (0xb)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: conv.i4
//IL_0003: ldarg.0
//IL_0004: ldind.i8
//IL_0005: ldc.i4.s 32
//IL_0007: shr
//IL_0008: conv.i4
//IL_0009: xor
//IL_000a: ret
return (int)this ^ (int)(this >> 32);
}
public override string ToString()
{
// 代码大小 14 (0xe)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: ldnull
//IL_0003: call class System.Globalization.NumberFormatInfo System.Globalization.NumberFormatInfo::get_CurrentInfo()
//IL_0008: call string System.Number::FormatInt64(int64,
// string,
// class System.Globalization.NumberFormatInfo)
//IL_000d: ret
return System.Number.FormatInt64(this,null,NumberFormatInfo.CurrentInfo);
}
public new virtual sealed string ToString(System.IFormatProvider provider)
{
// 代码大小 15 (0xf)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: ldnull
//IL_0003: ldarg.1
//IL_0004: call class System.Globalization.NumberFormatInfo System.Globalization.NumberFormatInfo::GetInstance(class System.IFormatProvider)
//IL_0009: call string System.Number::FormatInt64(int64,
// string,
// class System.Globalization.NumberFormatInfo)
//IL_000e: ret
return System.Number.FormatInt64(this, null, NumberFormatInfo.GetInstance(provider));
}
public string ToString(string format)
{
// 代码大小 14 (0xe)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: ldarg.1
//IL_0003: call class System.Globalization.NumberFormatInfo System.Globalization.NumberFormatInfo::get_CurrentInfo()
//IL_0008: call string System.Number::FormatInt64(int64,
// string,
// class System.Globalization.NumberFormatInfo)
//IL_000d: ret
return System.Number.FormatInt64(this, format, NumberFormatInfo.CurrentInfo);
}
public new virtual sealed string ToString(string format,System.IFormatProvider provider)
{
// 代码大小 15 (0xf)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: ldarg.1
//IL_0003: ldarg.2
//IL_0004: call class System.Globalization.NumberFormatInfo System.Globalization.NumberFormatInfo::GetInstance(class System.IFormatProvider)
//IL_0009: call string System.Number::FormatInt64(int64,
// string,
// class System.Globalization.NumberFormatInfo)
//IL_000e: ret
return System.Number.FormatInt64(this, format, NumberFormatInfo.GetInstance(provider));
}
public static long Parse(string s)
{
// 代码大小 13 (0xd)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldc.i4.7
//IL_0002: call class System.Globalization.NumberFormatInfo System.Globalization.NumberFormatInfo::get_CurrentInfo()
//IL_0007: call int64 System.Number::ParseInt64(string,
// valuetype System.Globalization.NumberStyles,
// class System.Globalization.NumberFormatInfo)
//IL_000c: ret
return System.Number.ParseInt64(s,NumberStyles.Integer,NumberFormatInfo.CurrentInfo);
}
public static long Parse(string s,System.Globalization.NumberStyles style)
{
// 代码大小 19 (0x13)
//.maxstack 8
//IL_0000: ldarg.1
//IL_0001: call void System.Globalization.NumberFormatInfo::ValidateParseStyleInteger(valuetype System.Globalization.NumberStyles)
//IL_0006: ldarg.0
//IL_0007: ldarg.1
//IL_0008: call class System.Globalization.NumberFormatInfo System.Globalization.NumberFormatInfo::get_CurrentInfo()
//IL_000d: call int64 System.Number::ParseInt64(string,
// valuetype System.Globalization.NumberStyles,
// class System.Globalization.NumberFormatInfo)
//IL_0012: ret
NumberFormatInfo.ValidateParseStyleInteger(style);
return System.Number.ParseInt64(s, style, NumberFormatInfo.CurrentInfo);
}
public static long Parse(string s,System.IFormatProvider provider)
{
// 代码大小 14 (0xe)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldc.i4.7
//IL_0002: ldarg.1
//IL_0003: call class System.Globalization.NumberFormatInfo System.Globalization.NumberFormatInfo::GetInstance(class System.IFormatProvider)
//IL_0008: call int64 System.Number::ParseInt64(string,
// valuetype System.Globalization.NumberStyles,
// class System.Globalization.NumberFormatInfo)
//IL_000d: ret
return System.Number.ParseInt64(s, NumberStyles.Integer, NumberFormatInfo.GetInstance(provider));
}
public static long Parse(string s,System.Globalization.NumberStyles style,System.IFormatProvider provider)
{
// 代码大小 20 (0x14)
//.maxstack 8
//IL_0000: ldarg.1
//IL_0001: call void System.Globalization.NumberFormatInfo::ValidateParseStyleInteger(valuetype System.Globalization.NumberStyles)
//IL_0006: ldarg.0
//IL_0007: ldarg.1
//IL_0008: ldarg.2
//IL_0009: call class System.Globalization.NumberFormatInfo System.Globalization.NumberFormatInfo::GetInstance(class System.IFormatProvider)
//IL_000e: call int64 System.Number::ParseInt64(string,
// valuetype System.Globalization.NumberStyles,
// class System.Globalization.NumberFormatInfo)
//IL_0013: ret
NumberFormatInfo.ValidateParseStyleInteger(style);
return System.Number.ParseInt64(s, style, NumberFormatInfo.GetInstance(provider));
}
public static bool TryParse(string s,out long result)
{
// 代码大小 14 (0xe)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldc.i4.7
//IL_0002: call class System.Globalization.NumberFormatInfo System.Globalization.NumberFormatInfo::get_CurrentInfo()
//IL_0007: ldarg.1
//IL_0008: call bool System.Number::TryParseInt64(string,
// valuetype System.Globalization.NumberStyles,
// class System.Globalization.NumberFormatInfo,
// int64&)
//IL_000d: ret
return System.Number.TryParseInt64(s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo, out result);
}
public static bool TryParse(string s,System.Globalization.NumberStyles style,System.IFormatProvider provider,out long result)
{
// 代码大小 21 (0x15)
//.maxstack 8
//IL_0000: ldarg.1
//IL_0001: call void System.Globalization.NumberFormatInfo::ValidateParseStyleInteger(valuetype System.Globalization.NumberStyles)
//IL_0006: ldarg.0
//IL_0007: ldarg.1
//IL_0008: ldarg.2
//IL_0009: call class System.Globalization.NumberFormatInfo System.Globalization.NumberFormatInfo::GetInstance(class System.IFormatProvider)
//IL_000e: ldarg.3
//IL_000f: call bool System.Number::TryParseInt64(string,
// valuetype System.Globalization.NumberStyles,
// class System.Globalization.NumberFormatInfo,
// int64&)
//IL_0014: ret
NumberFormatInfo.ValidateParseStyleInteger(style);
return System.Number.TryParseInt64(s, style, NumberFormatInfo.GetInstance(provider), out result);
}
public new virtual sealed System.TypeCode GetTypeCode()
{
// 代码大小 3 (0x3)
//.maxstack 8
//IL_0000: ldc.i4.s 11
//IL_0002: ret
return TypeCode.Int64;
}
private new virtual sealed bool System.IConvertible.ToBoolean(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call bool System.Convert::ToBoolean(int64)
//IL_0007: ret
return System.Convert.ToBoolean(this);
}
private new virtual sealed char System.IConvertible.ToChar(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call char System.Convert::ToChar(int64)
//IL_0007: ret
return System.Convert.ToChar(this);
}
private new virtual sealed sbyte System.IConvertible.ToSByte(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call int8 System.Convert::ToSByte(int64)
//IL_0007: ret
return System.Convert.ToSByte(this);
}
private new virtual sealed byte System.IConvertible.ToByte(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call uint8 System.Convert::ToByte(int64)
//IL_0007: ret
return System.Convert.ToByte(this);
}
private new virtual sealed short System.IConvertible.ToInt16(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call int16 System.Convert::ToInt16(int64)
//IL_0007: ret
return System.Convert.ToInt16(this);
}
private new virtual sealed ushort System.IConvertible.ToUInt16(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call uint16 System.Convert::ToUInt16(int64)
//IL_0007: ret
return System.Convert.ToUInt16(this);
}
private new virtual sealed int System.IConvertible.ToInt32(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call int32 System.Convert::ToInt32(int64)
//IL_0007: ret
return System.Convert.ToInt32(this);
}
private new virtual sealed uint System.IConvertible.ToUInt32(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call uint32 System.Convert::ToUInt32(int64)
//IL_0007: ret
return System.Convert.ToUInt32(this);
}
private new virtual sealed long System.IConvertible.ToInt64(System.IFormatProvider provider)
{
// 代码大小 3 (0x3)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: ret
return this;
}
private new virtual sealed ulong System.IConvertible.ToUInt64(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call uint64 System.Convert::ToUInt64(int64)
//IL_0007: ret
return System.Convert.ToUInt64(this);
}
private new virtual sealed float System.IConvertible.ToSingle(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call float32 System.Convert::ToSingle(int64)
//IL_0007: ret
return System.Convert.ToSingle(this);
}
private new virtual sealed double System.IConvertible.ToDouble(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call float64 System.Convert::ToDouble(int64)
//IL_0007: ret
return System.Convert.ToDouble(this);
}
private new virtual sealed System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider provider)
{
// 代码大小 8 (0x8)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: call valuetype System.Decimal System.Convert::ToDecimal(int64)
//IL_0007: ret
return System.Convert.ToDecimal(this);
}
private new virtual sealed System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider)
{
// 代码大小 50 (0x32)
//.maxstack 5
//.locals init (object[] V_0)
//IL_0000: call class System.Globalization.CultureInfo System.Globalization.CultureInfo::get_CurrentCulture()
//IL_0005: ldstr "InvalidCast_FromTo"
//IL_000a: call string System.Environment::GetResourceString(string)
//IL_000f: ldc.i4.2
//IL_0010: newarr System.Object
//IL_0015: stloc.0
//IL_0016: ldloc.0
//IL_0017: ldc.i4.0
//IL_0018: ldstr "Int64"
//IL_001d: stelem.ref
//IL_001e: ldloc.0
//IL_001f: ldc.i4.1
//IL_0020: ldstr "DateTime"
//IL_0025: stelem.ref
//IL_0026: ldloc.0
//IL_0027: call string System.String::Format(class System.IFormatProvider,
// string,
// object[])
//IL_002c: newobj instance void System.InvalidCastException::.ctor(string)
//IL_0031: throw
}
private new virtual sealed object System.IConvertible.ToType(System.Type @type,System.IFormatProvider provider)
{
// 代码大小 15 (0xf)
//.maxstack 8
//IL_0000: ldarg.0
//IL_0001: ldind.i8
//IL_0002: box System.Int64
//IL_0007: ldarg.1
//IL_0008: ldarg.2
//IL_0009: call object System.Convert::DefaultToType(class System.IConvertible,
// class System.Type,
// class System.IFormatProvider)
//IL_000e: ret
return System.Convert.DefaultToType((System.IConvertible)this,@type,provider);
}
}
}