Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C#

ulong: practical reference

ulong: practical reference: ulong is a 64-bit unsigned integer.

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

Syntax

ulong value

ulong is a 64-bit unsigned integer.

Use it for 64-bit masks and external unsigned formats.

The upper half of its range cannot convert losslessly to long.

Overflow wraps modulo 2^64 in unchecked context, and a literal may need the UL suffix.

The complete program actually uses ulong; its exact expected stdout is System.UInt64.

Examples

using System;

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

Result

System.UInt64

The complete program actually uses `ulong`; its exact expected stdout is `System.UInt64`.

Sources