Show / Hide Table of Contents

    Struct UInt64

    Represents a 64-bit ununsigned integer.

    Inherited Members
    ValueType.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Namespace: System
    Assembly: mscorlib.dll
    Syntax
    [CLSCompliant(false)]
    public struct UInt64

    Fields

    | Improve this Doc View Source

    MaxValue

    Represents the largest possible value of UInt64. This field is constant.

    Declaration
    public const ulong MaxValue = 18446744073709551615UL
    Field Value
    Type Description
    UInt64
    Remarks

    The value of this constant is 18,446,744,073,709,551,615; that is, hexadecimal 0xFFFFFFFFFFFFFFFF.

    | Improve this Doc View Source

    MinValue

    Represents the smallest possible value of UInt64. This field is constant.

    Declaration
    public const ulong MinValue = 0UL
    Field Value
    Type Description
    UInt64
    Remarks

    The value of this constant is 0.

    Methods

    | Improve this Doc View Source

    Parse(String)

    Converts the string representation of a number to its 64-bit unsigned integer equivalent.

    Declaration
    [CLSCompliant(false)]
    public static ulong Parse(string s)
    Parameters
    Type Name Description
    String s

    A string that represents the number to convert.

    Returns
    Type Description
    UInt64

    A 64-bit unsigned integer equivalent to the number contained in s.

    Exceptions
    Type Condition
    ArgumentNullException

    s is null.

    | Improve this Doc View Source

    ToString()

    Converts the numeric value of this instance to its equivalent string representation.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    The string representation of the value of this instance, consisting of a sequence of digits ranging from 0 to 9, without a sign or leading zeroes.

    Overrides
    Object.ToString()
    | Improve this Doc View Source

    ToString(String)

    Converts the numeric value of this instance to its equivalent string representation using the specified format.

    Declaration
    public string ToString(string format)
    Parameters
    Type Name Description
    String format

    A numeric format string.

    Returns
    Type Description
    String

    The string representation of the value of this instance as specified by format.

    | Improve this Doc View Source

    TryParse(String, out UInt64)

    Converts the string representation of a number to its 64-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded.

    Declaration
    public static bool TryParse(string s, out ulong result)
    Parameters
    Type Name Description
    String s

    Converts the string representation of a number to its 64-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded.

    UInt64 result

    When this method returns, contains the 64-bit unsigned integer value equivalent of the number contained in s, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is null or Empty, is not of the correct format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized; any value originally supplied in result will be overwritten.

    Returns
    Type Description
    Boolean

    true if s was converted successfully; otherwise, false.

    Remarks

    The TryParse(String, out UInt64) method is like the Parse(String) method, except the TryParse(String, out UInt64) method does not throw an exception if the conversion fails. It eliminates the need to use exception handling to test for a FormatException in the event that s is invalid and cannot be successfully parsed.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2018 nanoFramework Contributors
    Generated by DocFX