Base di conoscenzaCentro esami
ITItaliano
Scegli la lingua13

CKTIS / C#

ulong: riferimento pratico

ulong: riferimento pratico: ulong è un intero unsigned a 64 bit.

Versione: C# built-in type reference; .NET 10 runtime

Sintassi

ulong value

ulong è un intero unsigned a 64 bit.

Usalo per maschere a 64 bit e formati esterni senza segno.

La metà superiore dell’intervallo non si converte senza perdita in long.

L’overflow fa wrap modulo 2^64 in unchecked e un letterale può richiedere il suffisso UL.

Il programma completo usa realmente ulong; lo stdout esatto atteso è System.UInt64.

Esempi

using System;

Console.WriteLine(typeof(ulong).FullName);

Risultato

System.UInt64

Il programma completo usa realmente `ulong`; lo stdout esatto atteso è `System.UInt64`.

Fonti