← Standard library

uint64

struct uint64

Available without an import.

A 64-bit unsigned integer with default value zero. Parsing accepts bases 2 through 36 and stops at trailing non-digit text. Use ParseDetailed for a structured error instead of null.

Integers.wax:886

Members

constructorconstructor

public constructor ()

Creates zero.

Integers.wax:891

MinValueconst

const uint64 MinValue = 0

The smallest value representable by this integer type.

Integers.wax:897

MaxValueconst

const uint64 MaxValue = 18446744073709551615

The largest value representable by this integer type.

Integers.wax:901

GetHashCodemethod

public fn GetHashCode() : uint32

Returns a hash consistent with integer value equality.

Integers.wax:905

ToStringmethod

public fn ToString() : string

Returns base-10 text without grouping separators.

Integers.wax:911

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Appends the same text as ToString and returns the number of UTF-8 bytes appended.

Integers.wax:917

Formatmethod

public fn Format(string fmt) : string

Formats decimal by default, hexadecimal for X/x, or binary for B/b. A decimal suffix selects minimum digit width, capped at 99, with zero padding. No base prefix or sign is added.

Integers.wax:926

FormatBuffermethod

public fn FormatBuffer(StringBuilder builder, string fmt) : int32

Appends formatted integer text and returns the number of UTF-8 bytes appended.

Integers.wax:932

Equalsmethod

public fn Equals(uint64 other) : bool

Tests integer value equality.

Integers.wax:940

CompareTomethod

public fn CompareTo(uint64 other) : int32

Returns -1, 0, or 1 for less, equal, or greater.

Integers.wax:944

Parsemethod

public static fn Parse(string text, int32 radix = 10) : uint64?

Uses ParseDetailed syntax, returning null instead of throwing on failure. A successful prefix does not imply the entire input was numeric.

Integers.wax:953

ParseDetailedmethod

public static fn ParseDetailed(string text, int32 radix = 10) : uint64 throws ParseError

Parses a base-2 through base-36 prefix, skipping leading spaces/tabs and accepting a sign. After the first digit, underscores are ignored and the first invalid digit ends parsing. Throws ParseError for missing/invalid digits, an unsupported radix, or a value outside this type's range. A minus sign is rejected, including for zero.

Integers.wax:964

Reinterpretmethod

public fn Reinterpret<T>() : T where T is numeric

Reinterprets bits as a numeric type of the same width rather than converting the numeric value. Incompatible widths are rejected. Floating-point NaNs are canonicalized when entering or leaving a floating-point type; NaN payload bits are not preserved.

Integers.wax:976

nanosecondsgetter

public get nanoseconds() : timespan

Interprets this value as nanoseconds and converts to a duration stored in signed 64-bit nanoseconds. Keep the converted value within the signed 64-bit nanosecond range.

Integers.wax:983

microsecondsgetter

public get microseconds() : timespan

Interprets this value as microseconds and converts to a duration stored in signed 64-bit nanoseconds. Keep the converted value within the signed 64-bit nanosecond range.

Integers.wax:988

millisecondsgetter

public get milliseconds() : timespan

Interprets this value as milliseconds and converts to a duration stored in signed 64-bit nanoseconds. Keep the converted value within the signed 64-bit nanosecond range.

Integers.wax:993

secondsgetter

public get seconds() : timespan

Interprets this value as seconds and converts to a duration stored in signed 64-bit nanoseconds. Keep the converted value within the signed 64-bit nanosecond range.

Integers.wax:998

minutesgetter

public get minutes() : timespan

Interprets this value as minutes and converts to a duration stored in signed 64-bit nanoseconds. Keep the converted value within the signed 64-bit nanosecond range.

Integers.wax:1003

hoursgetter

public get hours() : timespan

Interprets this value as hours and converts to a duration stored in signed 64-bit nanoseconds. Keep the converted value within the signed 64-bit nanosecond range.

Integers.wax:1008

degreesgetter

public get degrees() : angle

Interprets this value as degrees and converts to an angle stored in float radians. Does not normalize the angle to one revolution.

Integers.wax:1013

radiansgetter

public get radians() : angle

Interprets this value as radians and converts to an angle stored in float radians. Does not normalize the angle to one revolution.

Integers.wax:1018

turnsgetter

public get turns() : angle

Interprets this value as turns and converts to an angle stored in float radians. Does not normalize the angle to one revolution.

Integers.wax:1023