nint nint Struct

Definition

Native signed integer (32-bit in 32-bit platforms, and 64-bit on 64-bit platforms)

[System.Serializable]
public struct nint : IComparable, IComparable<nint>, IConvertible, IEquatable<nint>, IFormattable
type nint = struct
    interface IFormattable
    interface IConvertible
Inheritance
Attributes
Implements

Remarks

This data type is a floating point value that uses the natural size of the host architecture to store its value.  On 32-bit systems, this uses T:System.Int32 for storage and on 64-bit systems it uses T:System.Int64 for storage.  

As an optimization, the compiler and runtime have special knowledge of this data type, so while there is no dedicated set of IL instructions to deal with variable-size floating point values, the runtime will transform uses of nfloat into their native underlying representation transparently.

This type is defined in lowercase because it makes it feel like a C# data type when used in C# source code.

Constructors

nint(Int32) nint(Int32)
nint(Int64) nint(Int64)

Fields

MaxValue MaxValue
MinValue MinValue
Size Size

Methods

CompareTo(nint) CompareTo(nint)
CompareTo(Object) CompareTo(Object)
CopyArray(IntPtr, nint[], Int32, Int32) CopyArray(IntPtr, nint[], Int32, Int32)
CopyArray(nint[], Int32, IntPtr, Int32) CopyArray(nint[], Int32, IntPtr, Int32)
Equals(nint) Equals(nint)
Equals(Object) Equals(Object)
GetHashCode() GetHashCode()
GetTypeCode() GetTypeCode()
Parse(String) Parse(String)
Parse(String, NumberStyles) Parse(String, NumberStyles)
Parse(String, IFormatProvider) Parse(String, IFormatProvider)
Parse(String, NumberStyles, IFormatProvider) Parse(String, NumberStyles, IFormatProvider)
ToString(String, IFormatProvider) ToString(String, IFormatProvider)
ToString(String) ToString(String)
ToString(IFormatProvider) ToString(IFormatProvider)
ToString() ToString()
TryParse(String, nint) TryParse(String, nint)
TryParse(String, NumberStyles, IFormatProvider, nint) TryParse(String, NumberStyles, IFormatProvider, nint)

Operators

Addition(nint, nint) Addition(nint, nint)
BitwiseAnd(nint, nint) BitwiseAnd(nint, nint)
BitwiseOr(nint, nint) BitwiseOr(nint, nint)
Decrement(nint) Decrement(nint)
Division(nint, nint) Division(nint, nint)
Equality(nint, nint) Equality(nint, nint)
ExclusiveOr(nint, nint) ExclusiveOr(nint, nint)
Explicit(UInt64 to nint) Explicit(UInt64 to nint)
Explicit(UInt32 to nint) Explicit(UInt32 to nint)
Explicit(UInt16 to nint) Explicit(UInt16 to nint)
Explicit(Single to nint) Explicit(Single to nint)
Explicit(nuint to nint) Explicit(nuint to nint)
Explicit(nint to UInt64) Explicit(nint to UInt64)
Explicit(nint to UInt32) Explicit(nint to UInt32)
Explicit(nint to UInt16) Explicit(nint to UInt16)
Explicit(nint to SByte) Explicit(nint to SByte)
Explicit(nint to nuint) Explicit(nint to nuint)
Explicit(IntPtr to nint) Explicit(IntPtr to nint)
Explicit(nint to Int32) Explicit(nint to Int32)
Explicit(nint to Int16) Explicit(nint to Int16)
Explicit(nint to Char) Explicit(nint to Char)
Explicit(nint to Byte) Explicit(nint to Byte)
Explicit(nfloat to nint) Explicit(nfloat to nint)
Explicit(Int64 to nint) Explicit(Int64 to nint)
Explicit(Double to nint) Explicit(Double to nint)
Explicit(Decimal to nint) Explicit(Decimal to nint)
Explicit(nint to IntPtr) Explicit(nint to IntPtr)
GreaterThan(nint, nint) GreaterThan(nint, nint)
GreaterThanOrEqual(nint, nint) GreaterThanOrEqual(nint, nint)
Implicit(nint to Int64) Implicit(nint to Int64)
Implicit(SByte to nint) Implicit(SByte to nint)
Implicit(nint to Single) Implicit(nint to Single)
Implicit(nint to nfloat) Implicit(nint to nfloat)
Implicit(nint to Double) Implicit(nint to Double)
Implicit(Int32 to nint) Implicit(Int32 to nint)
Implicit(Int16 to nint) Implicit(Int16 to nint)
Implicit(Char to nint) Implicit(Char to nint)
Implicit(Byte to nint) Implicit(Byte to nint)
Implicit(nint to Decimal) Implicit(nint to Decimal)
Increment(nint) Increment(nint)
Inequality(nint, nint) Inequality(nint, nint)
LeftShift(nint, Int32) LeftShift(nint, Int32)
LessThan(nint, nint) LessThan(nint, nint)
LessThanOrEqual(nint, nint) LessThanOrEqual(nint, nint)
Modulus(nint, nint) Modulus(nint, nint)
Multiply(nint, nint) Multiply(nint, nint)
OnesComplement(nint) OnesComplement(nint)
RightShift(nint, Int32) RightShift(nint, Int32)
Subtraction(nint, nint) Subtraction(nint, nint)
UnaryNegation(nint) UnaryNegation(nint)
UnaryPlus(nint) UnaryPlus(nint)

Explicit Interface Implementations

IConvertible.ToBoolean(IFormatProvider) IConvertible.ToBoolean(IFormatProvider)
IConvertible.ToByte(IFormatProvider) IConvertible.ToByte(IFormatProvider)
IConvertible.ToChar(IFormatProvider) IConvertible.ToChar(IFormatProvider)
IConvertible.ToDateTime(IFormatProvider) IConvertible.ToDateTime(IFormatProvider)
IConvertible.ToDecimal(IFormatProvider) IConvertible.ToDecimal(IFormatProvider)
IConvertible.ToDouble(IFormatProvider) IConvertible.ToDouble(IFormatProvider)
IConvertible.ToInt16(IFormatProvider) IConvertible.ToInt16(IFormatProvider)
IConvertible.ToInt32(IFormatProvider) IConvertible.ToInt32(IFormatProvider)
IConvertible.ToInt64(IFormatProvider) IConvertible.ToInt64(IFormatProvider)
IConvertible.ToSByte(IFormatProvider) IConvertible.ToSByte(IFormatProvider)
IConvertible.ToSingle(IFormatProvider) IConvertible.ToSingle(IFormatProvider)
IConvertible.ToType(Type, IFormatProvider) IConvertible.ToType(Type, IFormatProvider)
IConvertible.ToUInt16(IFormatProvider) IConvertible.ToUInt16(IFormatProvider)
IConvertible.ToUInt32(IFormatProvider) IConvertible.ToUInt32(IFormatProvider)
IConvertible.ToUInt64(IFormatProvider) IConvertible.ToUInt64(IFormatProvider)

Applies to