Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C#

long: practical reference

long: practical reference: long is the 64-bit signed System.Int64 type.

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

Syntax

long value

long is the 64-bit signed System.Int64 type.

Use it for large counters, sizes, and timestamps with an explicit unit.

It is not inherently safe for money or unbounded growth.

A literal may need the L suffix, and overflow remains possible.

The complete program actually uses long; its exact expected stdout is System.Int64.

Examples

using System;

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

Result

System.Int64

The complete program actually uses `long`; its exact expected stdout is `System.Int64`.

Sources