Skip to content

Int64Extensions Class

Definition

Extension methods for Int64.

public static class Int64Extensions

View source

Methods

Name Description
GetBit(Int64, Int32) Gets the value of the bit at the specified index.
LeftMostBit(Int64) Gets the left-most bit (bit 63) of a long.
ResetBit(Int64, Int32) Returns a new long with the bit at the specified index cleared.
RightMostBit(Int64) Gets the right-most bit (bit 0) of a long.
SetBit(Int64, Int32) Returns a new long with the bit at the specified index set.
SignBit(Int64) Gets the sign bit (bit 63) of a long.
ToBinaryString(Int64) Converts a long to its binary string representation, e.g. "0b0000000100000010000000110000010000000101000001100000011100001000".