Skip to content
CShift0.32

int64

Struct · built-in type

struct int64 : IComparable<int64>, IEquatable<int64>, IHashable

A signed 64-bit integer.

Arithmetic is checked: an overflow, a division by zero or a conversion that loses the value ends the program with a panic, unless the code is unchecked (then it wraps around). See the language guide (basics).

Name Description
MinValue The smallest value, -9223372036854775808.
MaxValue The largest value, 9223372036854775807.
static int64 MinValue

The smallest value, -9223372036854775808.

static int64 MaxValue

The largest value, 9223372036854775807.

Name Description
ToString The number as decimal text: 42.ToString() is "42".
Equals Whether the numbers are equal (also a == b).
CompareTo Compares the numbers: -1, 0 or 1.
GetHashCode A hash code of the number, for Dictionary keys.
string ToString()

The number as decimal text: 42.ToString() is "42".

string ToString(string format)

The number in a number format: 255.ToString("X4") is "00FF" (see NumberFormat).

Parameters

  • format: D, X, B, F, N, E, P or G, optionally followed by up to two digits.
bool Equals(int64 other)

Whether the numbers are equal (also a == b).

int CompareTo(int64 other)

Compares the numbers: -1, 0 or 1.

int GetHashCode()

A hash code of the number, for Dictionary keys.