Int64 Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a 64-bit signed integer.
public value class long : IComparable, IComparable<long>, IConvertible, IEquatable<long>, IFormattable
public value class long : IComparable, IComparable<long>, IConvertible, IEquatable<long>, ISpanFormattable
public value class long : IComparable<long>, IConvertible, IEquatable<long>, IParsable<long>, ISpanParsable<long>, System::Numerics::IAdditionOperators<long, long, long>, System::Numerics::IAdditiveIdentity<long, long>, System::Numerics::IBinaryInteger<long>, System::Numerics::IBinaryNumber<long>, System::Numerics::IBitwiseOperators<long, long, long>, System::Numerics::IComparisonOperators<long, long, bool>, System::Numerics::IDecrementOperators<long>, System::Numerics::IDivisionOperators<long, long, long>, System::Numerics::IEqualityOperators<long, long, bool>, System::Numerics::IIncrementOperators<long>, System::Numerics::IMinMaxValue<long>, System::Numerics::IModulusOperators<long, long, long>, System::Numerics::IMultiplicativeIdentity<long, long>, System::Numerics::IMultiplyOperators<long, long, long>, System::Numerics::INumber<long>, System::Numerics::INumberBase<long>, System::Numerics::IShiftOperators<long, int, long>, System::Numerics::ISignedNumber<long>, System::Numerics::ISubtractionOperators<long, long, long>, System::Numerics::IUnaryNegationOperators<long, long>, System::Numerics::IUnaryPlusOperators<long, long>
public value class long : IComparable<long>, IConvertible, IEquatable<long>, IParsable<long>, ISpanParsable<long>, IUtf8SpanParsable<long>, System::Numerics::IAdditionOperators<long, long, long>, System::Numerics::IAdditiveIdentity<long, long>, System::Numerics::IBinaryInteger<long>, System::Numerics::IBinaryNumber<long>, System::Numerics::IBitwiseOperators<long, long, long>, System::Numerics::IComparisonOperators<long, long, bool>, System::Numerics::IDecrementOperators<long>, System::Numerics::IDivisionOperators<long, long, long>, System::Numerics::IEqualityOperators<long, long, bool>, System::Numerics::IIncrementOperators<long>, System::Numerics::IMinMaxValue<long>, System::Numerics::IModulusOperators<long, long, long>, System::Numerics::IMultiplicativeIdentity<long, long>, System::Numerics::IMultiplyOperators<long, long, long>, System::Numerics::INumber<long>, System::Numerics::INumberBase<long>, System::Numerics::IShiftOperators<long, int, long>, System::Numerics::ISignedNumber<long>, System::Numerics::ISubtractionOperators<long, long, long>, System::Numerics::IUnaryNegationOperators<long, long>, System::Numerics::IUnaryPlusOperators<long, long>
public value class long : IComparable, IConvertible, IFormattable
public value class long : IComparable, IComparable<long>, IEquatable<long>, IFormattable
public struct Int64 : IComparable, IComparable<long>, IConvertible, IEquatable<long>, IFormattable
public readonly struct Int64 : IComparable, IComparable<long>, IConvertible, IEquatable<long>, IFormattable
public readonly struct Int64 : IComparable, IComparable<long>, IConvertible, IEquatable<long>, ISpanFormattable
public readonly struct Int64 : IComparable<long>, IConvertible, IEquatable<long>, IParsable<long>, ISpanParsable<long>, System.Numerics.IAdditionOperators<long,long,long>, System.Numerics.IAdditiveIdentity<long,long>, System.Numerics.IBinaryInteger<long>, System.Numerics.IBinaryNumber<long>, System.Numerics.IBitwiseOperators<long,long,long>, System.Numerics.IComparisonOperators<long,long,bool>, System.Numerics.IDecrementOperators<long>, System.Numerics.IDivisionOperators<long,long,long>, System.Numerics.IEqualityOperators<long,long,bool>, System.Numerics.IIncrementOperators<long>, System.Numerics.IMinMaxValue<long>, System.Numerics.IModulusOperators<long,long,long>, System.Numerics.IMultiplicativeIdentity<long,long>, System.Numerics.IMultiplyOperators<long,long,long>, System.Numerics.INumber<long>, System.Numerics.INumberBase<long>, System.Numerics.IShiftOperators<long,int,long>, System.Numerics.ISignedNumber<long>, System.Numerics.ISubtractionOperators<long,long,long>, System.Numerics.IUnaryNegationOperators<long,long>, System.Numerics.IUnaryPlusOperators<long,long>
public readonly struct Int64 : IComparable<long>, IConvertible, IEquatable<long>, IParsable<long>, ISpanParsable<long>, IUtf8SpanParsable<long>, System.Numerics.IAdditionOperators<long,long,long>, System.Numerics.IAdditiveIdentity<long,long>, System.Numerics.IBinaryInteger<long>, System.Numerics.IBinaryNumber<long>, System.Numerics.IBitwiseOperators<long,long,long>, System.Numerics.IComparisonOperators<long,long,bool>, System.Numerics.IDecrementOperators<long>, System.Numerics.IDivisionOperators<long,long,long>, System.Numerics.IEqualityOperators<long,long,bool>, System.Numerics.IIncrementOperators<long>, System.Numerics.IMinMaxValue<long>, System.Numerics.IModulusOperators<long,long,long>, System.Numerics.IMultiplicativeIdentity<long,long>, System.Numerics.IMultiplyOperators<long,long,long>, System.Numerics.INumber<long>, System.Numerics.INumberBase<long>, System.Numerics.IShiftOperators<long,int,long>, System.Numerics.ISignedNumber<long>, System.Numerics.ISubtractionOperators<long,long,long>, System.Numerics.IUnaryNegationOperators<long,long>, System.Numerics.IUnaryPlusOperators<long,long>
[System.Serializable]
public struct Int64 : IComparable, IConvertible, IFormattable
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct Int64 : IComparable, IComparable<long>, IConvertible, IEquatable<long>, IFormattable
public struct Int64 : IComparable, IComparable<long>, IEquatable<long>, IFormattable
type int64 = struct
interface IConvertible
interface IFormattable
type int64 = struct
interface IConvertible
interface ISpanFormattable
interface IFormattable
type int64 = struct
interface IConvertible
interface IFormattable
interface IParsable<int64>
interface ISpanFormattable
interface ISpanParsable<int64>
interface IAdditionOperators<int64, int64, int64>
interface IAdditiveIdentity<int64, int64>
interface IBinaryInteger<int64>
interface IBinaryNumber<int64>
interface IBitwiseOperators<int64, int64, int64>
interface IComparisonOperators<int64, int64, bool>
interface IEqualityOperators<int64, int64, bool>
interface IDecrementOperators<int64>
interface IDivisionOperators<int64, int64, int64>
interface IIncrementOperators<int64>
interface IModulusOperators<int64, int64, int64>
interface IMultiplicativeIdentity<int64, int64>
interface IMultiplyOperators<int64, int64, int64>
interface INumber<int64>
interface INumberBase<int64>
interface ISubtractionOperators<int64, int64, int64>
interface IUnaryNegationOperators<int64, int64>
interface IUnaryPlusOperators<int64, int64>
interface IShiftOperators<int64, int, int64>
interface IMinMaxValue<int64>
interface ISignedNumber<int64>
type int64 = struct
interface IConvertible
interface IFormattable
interface IParsable<int64>
interface ISpanFormattable
interface ISpanParsable<int64>
interface IAdditionOperators<int64, int64, int64>
interface IAdditiveIdentity<int64, int64>
interface IBinaryInteger<int64>
interface IBinaryNumber<int64>
interface IBitwiseOperators<int64, int64, int64>
interface IComparisonOperators<int64, int64, bool>
interface IEqualityOperators<int64, int64, bool>
interface IDecrementOperators<int64>
interface IDivisionOperators<int64, int64, int64>
interface IIncrementOperators<int64>
interface IModulusOperators<int64, int64, int64>
interface IMultiplicativeIdentity<int64, int64>
interface IMultiplyOperators<int64, int64, int64>
interface INumber<int64>
interface INumberBase<int64>
interface ISubtractionOperators<int64, int64, int64>
interface IUnaryNegationOperators<int64, int64>
interface IUnaryPlusOperators<int64, int64>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<int64>
interface IShiftOperators<int64, int, int64>
interface IMinMaxValue<int64>
interface ISignedNumber<int64>
type int64 = struct
interface IConvertible
interface IFormattable
interface IParsable<int64>
interface ISpanFormattable
interface ISpanParsable<int64>
interface IUtf8SpanFormattable
interface IUtf8SpanParsable<int64>
interface IAdditionOperators<int64, int64, int64>
interface IAdditiveIdentity<int64, int64>
interface IBinaryInteger<int64>
interface IBinaryNumber<int64>
interface IBitwiseOperators<int64, int64, int64>
interface IComparisonOperators<int64, int64, bool>
interface IEqualityOperators<int64, int64, bool>
interface IDecrementOperators<int64>
interface IDivisionOperators<int64, int64, int64>
interface IIncrementOperators<int64>
interface IModulusOperators<int64, int64, int64>
interface IMultiplicativeIdentity<int64, int64>
interface IMultiplyOperators<int64, int64, int64>
interface INumber<int64>
interface INumberBase<int64>
interface ISubtractionOperators<int64, int64, int64>
interface IUnaryNegationOperators<int64, int64>
interface IUnaryPlusOperators<int64, int64>
interface IShiftOperators<int64, int, int64>
interface IMinMaxValue<int64>
interface ISignedNumber<int64>
[<System.Serializable>]
type int64 = struct
interface IFormattable
interface IConvertible
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type int64 = struct
interface IFormattable
interface IConvertible
type int64 = struct
interface IFormattable
Public Structure Int64
Implements IComparable, IComparable(Of Long), IConvertible, IEquatable(Of Long), IFormattable
Public Structure Int64
Implements IComparable, IComparable(Of Long), IConvertible, IEquatable(Of Long), ISpanFormattable
Public Structure Int64
Implements IAdditionOperators(Of Long, Long, Long), IAdditiveIdentity(Of Long, Long), IBinaryInteger(Of Long), IBinaryNumber(Of Long), IBitwiseOperators(Of Long, Long, Long), IComparable(Of Long), IComparisonOperators(Of Long, Long, Boolean), IConvertible, IDecrementOperators(Of Long), IDivisionOperators(Of Long, Long, Long), IEqualityOperators(Of Long, Long, Boolean), IEquatable(Of Long), IIncrementOperators(Of Long), IMinMaxValue(Of Long), IModulusOperators(Of Long, Long, Long), IMultiplicativeIdentity(Of Long, Long), IMultiplyOperators(Of Long, Long, Long), INumber(Of Long), INumberBase(Of Long), IParsable(Of Long), IShiftOperators(Of Long, Integer, Long), ISignedNumber(Of Long), ISpanParsable(Of Long), ISubtractionOperators(Of Long, Long, Long), IUnaryNegationOperators(Of Long, Long), IUnaryPlusOperators(Of Long, Long)
Public Structure Int64
Implements IAdditionOperators(Of Long, Long, Long), IAdditiveIdentity(Of Long, Long), IBinaryInteger(Of Long), IBinaryNumber(Of Long), IBitwiseOperators(Of Long, Long, Long), IComparable(Of Long), IComparisonOperators(Of Long, Long, Boolean), IConvertible, IDecrementOperators(Of Long), IDivisionOperators(Of Long, Long, Long), IEqualityOperators(Of Long, Long, Boolean), IEquatable(Of Long), IIncrementOperators(Of Long), IMinMaxValue(Of Long), IModulusOperators(Of Long, Long, Long), IMultiplicativeIdentity(Of Long, Long), IMultiplyOperators(Of Long, Long, Long), INumber(Of Long), INumberBase(Of Long), IParsable(Of Long), IShiftOperators(Of Long, Integer, Long), ISignedNumber(Of Long), ISpanParsable(Of Long), ISubtractionOperators(Of Long, Long, Long), IUnaryNegationOperators(Of Long, Long), IUnaryPlusOperators(Of Long, Long), IUtf8SpanParsable(Of Long)
Public Structure Int64
Implements IComparable, IConvertible, IFormattable
Public Structure Int64
Implements IComparable, IComparable(Of Long), IEquatable(Of Long), IFormattable
- Inheritance
- Attributes
- Implements
-
IComparable IComparable<Int64> IConvertible IEquatable<Int64> IFormattable ISpanFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<Int64> IParsable<TSelf> ISpanParsable<Int64> ISpanParsable<TSelf> IAdditionOperators<Int64,Int64,Int64> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<Int64,Int64> IAdditiveIdentity<TSelf,TSelf> IBinaryInteger<Int64> IBinaryNumber<Int64> IBinaryNumber<TSelf> IBitwiseOperators<Int64,Int64,Int64> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<Int64,Int64,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<Int64> IDecrementOperators<TSelf> IDivisionOperators<Int64,Int64,Int64> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<Int64,Int64,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<Int64> IIncrementOperators<TSelf> IMinMaxValue<Int64> IModulusOperators<Int64,Int64,Int64> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<Int64,Int64> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<Int64,Int64,Int64> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<Int64> INumber<TSelf> INumberBase<Int64> INumberBase<TSelf> IShiftOperators<Int64,Int32,Int64> IShiftOperators<TSelf,Int32,TSelf> ISignedNumber<Int64> ISubtractionOperators<Int64,Int64,Int64> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<Int64,Int64> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<Int64,Int64> IUnaryPlusOperators<TSelf,TSelf> IUtf8SpanFormattable IUtf8SpanParsable<Int64> IUtf8SpanParsable<TSelf>
Remarks
For more information about this API, see Supplemental API remarks for Int64.
Fields
MaxValue |
Represents the largest possible value of an Int64. This field is constant. |
MinValue |
Represents the smallest possible value of an Int64. This field is constant. |
Methods
Abs(Int64) |
Computes the absolute of a value. |
BigMul(Int64, Int64) |
Produces the full product of two 64-bit numbers. |
Clamp(Int64, Int64, Int64) |
Clamps a value to an inclusive minimum and maximum value. |
CompareTo(Int64) |
Compares this instance to a specified 64-bit signed integer and returns an indication of their relative values. |
CompareTo(Object) |
Compares this instance to a specified object and returns an indication of their relative values. |
CopySign(Int64, Int64) |
Copies the sign of a value to the sign of another value. |
CreateChecked<TOther>(TOther) |
Creates an instance of the current type from a value, throwing an overflow exception for any values that fall outside the representable range of the current type. |
CreateSaturating<TOther>(TOther) |
Creates an instance of the current type from a value, saturating any values that fall outside the representable range of the current type. |
CreateTruncating<TOther>(TOther) |
Creates an instance of the current type from a value, truncating any values that fall outside the representable range of the current type. |
DivRem(Int64, Int64) |
Computes the quotient and remainder of two values. |
Equals(Int64) |
Returns a value indicating whether this instance is equal to a specified Int64 value. |
Equals(Object) |
Returns a value indicating whether this instance is equal to a specified object. |
GetHashCode() |
Returns the hash code for this instance. |
GetTypeCode() | |
IsEvenInteger(Int64) |
Determines if a value represents an even integral number. |
IsNegative(Int64) |
Determines if a value is negative. |
IsOddInteger(Int64) |
Determines if a value represents an odd integral number. |
IsPositive(Int64) |
Determines if a value is positive. |
IsPow2(Int64) |
Determines if a value is a power of two. |
LeadingZeroCount(Int64) |
Computes the number of leading zeros in a value. |
Log2(Int64) |
Computes the log2 of a value. |
Max(Int64, Int64) |
Compares two values to compute which is greater. |
MaxMagnitude(Int64, Int64) |
Compares two values to compute which is greater. |
Min(Int64, Int64) |
Compares two values to compute which is lesser. |
MinMagnitude(Int64, Int64) |
Compares two values to compute which is lesser. |
Parse(ReadOnlySpan<Byte>, IFormatProvider) |
Parses a span of UTF-8 characters into a value. |
Parse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider) |
Parses a span of UTF-8 characters into a value. |
Parse(ReadOnlySpan<Char>, IFormatProvider) |
Parses a span of characters into a value. |
Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider) |
Converts the span representation of a number in a specified style and culture-specific format to its 64-bit signed integer equivalent. |
Parse(String) |
Converts the string representation of a number to its 64-bit signed integer equivalent. |
Parse(String, IFormatProvider) |
Converts the string representation of a number in a specified culture-specific format to its 64-bit signed integer equivalent. |
Parse(String, NumberStyles) |
Converts the string representation of a number in a specified style to its 64-bit signed integer equivalent. |
Parse(String, NumberStyles, IFormatProvider) |
Converts the string representation of a number in a specified style and culture-specific format to its 64-bit signed integer equivalent. |
PopCount(Int64) |
Computes the number of bits that are set in a value. |
RotateLeft(Int64, Int32) |
Rotates a value left by a given amount. |
RotateRight(Int64, Int32) |
Rotates a value right by a given amount. |
Sign(Int64) |
Computes the sign of a value. |
ToString() |
Converts the numeric value of this instance to its equivalent string representation. |
ToString(IFormatProvider) |
Converts the numeric value of this instance to its equivalent string representation using the specified culture-specific format information. |
ToString(String) |
Converts the numeric value of this instance to its equivalent string representation, using the specified format. |
ToString(String, IFormatProvider) |
Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information. |
TrailingZeroCount(Int64) |
Computes the number of trailing zeros in a value. |
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Tries to format the value of the current instance as UTF-8 into the provided span of bytes. |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
Tries to format the value of the current long number instance into the provided span of characters. |
TryParse(ReadOnlySpan<Byte>, IFormatProvider, Int64) |
Tries to parse a span of UTF-8 characters into a value. |
TryParse(ReadOnlySpan<Byte>, Int64) |
Tries to convert a UTF-8 character span containing the string representation of a number to its 64-bit signed integer equivalent. |
TryParse(ReadOnlySpan<Byte>, NumberStyles, IFormatProvider, Int64) |
Tries to parse a span of UTF-8 characters into a value. |
TryParse(ReadOnlySpan<Char>, IFormatProvider, Int64) |
Tries to parse a span of characters into a value. |
TryParse(ReadOnlySpan<Char>, Int64) |
Converts the span representation of a number to its 64-bit signed integer equivalent. A return value indicates whether the conversion succeeded or failed. |
TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, Int64) |
Converts the span representation of a number in a specified style and culture-specific format to its 64-bit signed integer equivalent. A return value indicates whether the conversion succeeded or failed. |
TryParse(String, IFormatProvider, Int64) |
Tries to parse a string into a value. |
TryParse(String, Int64) |
Converts the string representation of a number to its 64-bit signed integer equivalent. A return value indicates whether the conversion succeeded or failed. |
TryParse(String, NumberStyles, IFormatProvider, Int64) |
Converts the string representation of a number in a specified style and culture-specific format to its 64-bit signed integer equivalent. A return value indicates whether the conversion succeeded or failed. |
Explicit Interface Implementations
Applies to
Thread Safety
All members of this type are thread safe. Members that appear to modify instance state actually return a new instance initialized with the new value. As with any other type, reading and writing to a shared variable that contains an instance of this type must be protected by a lock to guarantee thread safety.