Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Native signed integer (32-bit in 32-bit platforms, and 64-bit on 64-bit platforms)
public struct nint : IComparable, IComparable<nint>, IConvertible, IEquatable<nint>, IFormattable
type nint = struct
This data type is an integer value that uses the natural size of the host architecture to store its value. On 32-bit systems, this uses for storage and on 64-bit systems it uses 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 integer values, the runtime will transform uses of nint 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.