nint 結構

定義

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

[System.Serializable]
public struct nint : IComparable, IComparable<nint>, IConvertible, IEquatable<nint>, IFormattable
type nint = struct
    interface IFormattable
    interface IConvertible
繼承
nint
屬性
實作

備註

此資料類型是整數值,會使用主機架構的自然大小來儲存其值。  在 32 位系統上,這會針對儲存體使用 T:System.Int32,並在 64 位系統上使用進行儲存。

作為優化,編譯器和執行時間具有此資料類型的特殊知識,因此,雖然沒有專用的 IL 指令集來處理可變大小的整數值,執行時間會以透明方式將 nint 的使用轉換成其原生基礎標記法。

此類型是以小寫方式定義,因為它在 C# 原始程式碼中使用時,它看起來像 C# 資料類型。

建構函式

nint(Int32)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

nint(Int64)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

欄位

MaxValue

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

MinValue

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Size

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

方法

CompareTo(nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

CompareTo(Object)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

CopyArray(IntPtr, nint[], Int32, Int32)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

CopyArray(nint[], Int32, IntPtr, Int32)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Equals(nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Equals(Object)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

GetHashCode()

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

GetTypeCode()

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Parse(String, IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Parse(String, NumberStyles, IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Parse(String, NumberStyles)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Parse(String)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

ToString()

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

ToString(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

ToString(String, IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

ToString(String)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

TryParse(String, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

TryParse(String, NumberStyles, IFormatProvider, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

操作員

Addition(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

BitwiseAnd(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

BitwiseOr(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Decrement(nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Division(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Equality(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

ExclusiveOr(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(Decimal to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(Double to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(Int64 to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(IntPtr to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nfloat to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nint to Byte)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nint to Char)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nint to Int16)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nint to Int32)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nint to IntPtr)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nint to nuint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nint to SByte)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nint to UInt16)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nint to UInt32)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nint to UInt64)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(nuint to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(Single to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(UInt16 to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(UInt32 to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Explicit(UInt64 to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

GreaterThan(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

GreaterThanOrEqual(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Implicit(Byte to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Implicit(Char to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Implicit(Int16 to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Implicit(Int32 to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Implicit(nint to Decimal)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Implicit(nint to Double)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Implicit(nint to Int64)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Implicit(nint to nfloat)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Implicit(nint to Single)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Implicit(SByte to nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Increment(nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Inequality(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

LeftShift(nint, Int32)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

LessThan(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

LessThanOrEqual(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Modulus(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Multiply(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

OnesComplement(nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

RightShift(nint, Int32)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

Subtraction(nint, nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

UnaryNegation(nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

UnaryPlus(nint)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

明確介面實作

IConvertible.ToBoolean(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToByte(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToChar(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToDateTime(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToDecimal(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToDouble(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToInt16(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToInt32(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToInt64(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToSByte(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToSingle(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToType(Type, IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToUInt16(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToUInt32(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

IConvertible.ToUInt64(IFormatProvider)

32 位平臺中的原生帶正負號整數 (32 位,以及 64 位平臺上的 64 位)

適用於