BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0 All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe. System.ValueType System.IComparable System.IComparable<System.UInt64> System.IConvertible System.IEquatable<System.UInt64> System.IFormattable System.CLSCompliant(false) System.Runtime.InteropServices.ComVisible(true)

The value type represents unsigned integers with values ranging from 0 to 18,446,744,073,709,551,615.

The type is not CLS-compliant. The CLS-compliant alternative type is . can be used instead to replace a value that ranges from zero to . For more information about CLS compliance, see Common Language Specification.

provides methods to compare instances of this type, convert the value of an instance to its string representation, and convert the string representation of a number to an instance of this type.

Represents a 64-bit unsigned integer.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 `` is not a and is not a null reference.

  Any instance of , regardless of its value, is considered greater than null.

  must be null or an instance of ; otherwise, an exception is thrown.

  Compares this instance to a specified object and returns an indication of their relative values.

  A signed number indicating the relative values of this instance and .

  Return Value

  Description

  Less than zero

  This instance is less than .

  Zero

  This instance is equal to .

  Greater than zero

  This instance is greater than .

  -or-

  is null.

  An object to compare, or null. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  This method implements the interface and performs slightly better than the method because it does not have to convert the parameter to an object.

  Depending on your programming language, it might be possible to code a method where the parameter type has fewer bits (is narrower) than the instance type. This is possible because some programming languages perform an implicit widening conversion that represents the parameter as a type with as many bits as the instance.

  For example, suppose the instance type is and the parameter type is . The Microsoft C# compiler generates instructions to represent the value of the parameter as an object, then generates a method that compares the values of the instance and the parameter representation.

  Consult your programming language's documentation to determine whether its compiler performs implicit widening conversions on numeric types.

  Compares this instance to a specified 64-bit unsigned integer and returns an indication of their relative values.

  A signed number indicating the relative values of this instance and .

  Return Value

  Description

  Less than zero

  This instance is less than .

  Zero

  This instance is equal to .

  Greater than zero

  This instance is greater than .

  An unsigned integer to compare.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  This method overrides .

  Returns a value indicating whether this instance is equal to a specified object.

  true if is an instance of and equals the value of this instance; otherwise, false.

  An object to compare to this instance. 0
- Method
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  This method implements the interface, and performs slightly better than because it does not have to convert the parameter to an object.

  Returns a value indicating whether this instance is equal to a specified value.

  true if has the same value as this instance; otherwise, false.

  A value to compare to this instance.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32

  The algorithm used to generate the hash code is unspecified.

  This method overrides .

  Returns the hash code for this instance.

  A 32-bit signed integer hash code.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.TypeCode To be added.

  Returns the for value type .

  The enumerated constant, .

- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.UInt64 18446744073709551615

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

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

  0
- Field
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.UInt64 0

  The value of this constant is 0.

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

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.UInt64 `` is a null reference. is not in the correct style.

  represents a number greater than or less than .

  This example demonstrates parsing a string to a .

  `using System; public class UInt64ParseClass { public static void Main() { string str = " 100 "; Console.WriteLine("String: \"{0}\" <UInt64> {1}",str,UInt64.Parse(str)); } }`

  The output is

  String: " 100 " <UInt64> 100

  The parameter should be the string representation of a number in the following form.

  [ws][sign]digits[ws]

  Elements in square brackets ([ and ]) are optional. The following table describes each element.

  Element

  Description

  ws

  Optional white space.

  sign

  An optional sign. Valid sign characters are determined by the and properties of the current culture. However, the negative sign symbol can be used only with zero; otherwise, the method throws an .

  digits

  A sequence of digits ranging from 0 to 9. Any leading zeros are ignored.

  The string specified by the parameter is interpreted by using the style. It cannot contain any group separators or decimal separator, and it cannot have a decimal portion.

  The parameter is parsed by using the formatting information in a object that is initialized for the current system culture. For more information, see . To parse a string by using the formatting information of a specific culture, use the method.

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

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

  A string that represents the number to convert. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.UInt64 `` `` is a null reference. is not in the correct style.

  represents a number greater than or less than .

  A string that represents the number to convert. The string is interpreted by using the style specified by the parameter. A bitwise combination of the enumeration values that specifies the permitted format of . A typical value to specify is .

  The parameter defines the style elements (such as white space, the positive or negative sign symbol, the group separator symbol, or the decimal point symbol) that are allowed in the parameter for the parse operation to succeed. must be a combination of bit flags from the enumeration. The parameter makes this method overload useful when contains the string representation of a hexadecimal value, when the number system (decimal or hexadecimal) represented by is known only at run time, or when you want to disallow white space or a sign symbol in .

  Depending on the value of , the parameter may include the following elements:

  [ws][$][sign][digits,]digits[.fractional_digits][E[sign]exponential_digits][ws]

  Elements in square brackets ([ and ]) are optional. If includes , the parameter may contain the following elements:

  [ws]hexdigits[ws]

  The following table describes each element.

  Element

  Description

  ws

  Optional white space. White space can appear at the start of if includes the flag, and it can appear at the end of if includes the flag.

  $

  A culture-specific currency symbol. Its position in the string is defined by the and properties of the current culture. The current culture's currency symbol can appear in if includes the flag.

  sign

  An optional sign. The sign can appear at the start of if includes the flag, and it can appear at the end of if includes the flag. Parentheses can be used in to indicate a negative value if includes the flag. However, the negative sign symbol can be used only with zero; otherwise, the method throws an .

  digits

  fractional_digits

  exponential_digits

  A sequence of digits from 0 through 9. For fractional_digits, only the digit 0 is valid.

  ,

  A culture-specific group separator symbol. The current culture's group separator can appear in if includes the flag.

  .

  A culture-specific decimal point symbol. The current culture's decimal point symbol can appear in if includes the flag. Only the digit 0 can appear as a fractional digit for the parse operation to succeed; if fractional_digits includes any other digit, a is thrown.

  E

  The "e" or "E" character, which indicates that the value is represented in exponential (scientific) notation. The parameter can represent a number in exponential notation if includes the flag.

  hexdigits

  A sequence of hexadecimal digits from 0 through f, or 0 through F.

  A string with digits only (which corresponds to the style) always parses successfully. Most of the remaining members control elements that may be present, but are not required to be present, in the input string. The following table indicates how individual members affect the elements that may be present in .

  NumberStyles value

  Elements permitted in in addition to digits

  The digits element only.

  The decimal point (.) and fractional-digits elements.

  The "e" or "E" character, which indicates exponential notation, along with exponential_digits.

  The ws element at the start of .

  The ws element at the end of .

  The sign element at the start of .

  The sign element at the end of .

  The sign element in the form of parentheses enclosing the numeric value.

  The group separator (,) element.

  The currency ($) element.

  All elements. However, cannot represent a hexadecimal number or a number in exponential notation.

  The ws element at the start or end of , sign at the start of , and the decimal point (.) symbol. The parameter can also use exponential notation.

  The , , group separator (,), and decimal point (.) elements.

  All elements. However, cannot represent a hexadecimal number.

  Unlike the other values, which allow for, but do not require, the presence of particular style elements in , the style value means that the individual numeric characters in are always interpreted as hexadecimal characters. Valid hexadecimal characters are 0-9, A-F, and a-f. The only other flags that can be combined with the parameter are and . (The enumeration includes a composite number style, , that includes both white-space flags.)

  If is the string representation of a hexadecimal number, it cannot be preceded by any decoration (such as 0x or &h) that differentiates it as a hexadecimal number. This causes the conversion to fail.

  The parameter is parsed by using the formatting information in a object that is initialized for the current system culture. To specify the culture whose formatting information is used for the parse operation, call the overload.

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

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

  A string that represents the number to convert. The string is interpreted by using the style specified by the parameter. A bitwise combination of the enumeration values that specifies the permitted format of . A typical value to specify is . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.UInt64 `` `` is a null reference. is not in the correct style. represents a number greater than or less than . A string that represents the number to convert. An object that supplies culture-specific formatting information about .

  This overload of the method is typically used to convert text that can be formatted in a variety of ways to a value. For example, it can be used to convert the text entered by a user into an HTML text box to a numeric value.

  The parameter contains a number of the form:

  [ws][sign]digits[ws]

  Items in square brackets ([ and ]) are optional. The following table describes each element.

  Element

  Description

  ws

  Optional white space.

  sign

  An optional positive sign, or a negative sign if represents the value zero.

  digits

  A sequence of digits ranging from 0 to 9.

  The s parameter is interpreted using the style. In addition to the unsigned integer value's decimal digits, only leading and trailing spaces along with a leading sign is allowed. (If the negative sign is present, must represent a value of zero, or the method throws an .) To explicitly define the style elements together with the culture-specific formatting information that can be present in , use the method.

  The parameter is an implementation whose method returns a object that provides culture-specific information about the format of . There are three ways to use the parameter to supply custom formatting information to the parse operation:

  You can pass the actual object that provides formatting information. (Its implementation of simply returns itself.)

  You can pass a object that specifies the culture whose formatting is to be used. Its property provides formatting information.

  You can pass a custom implementation. Its method must instantiate and return the object that provides formatting information.

  If is null, the for the current culture is used.

  Converts the string representation of a number in a specified culture-specific format to its 64-bit unsigned integer equivalent.

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

  A string that represents the number to convert. An object that supplies culture-specific formatting information about . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.UInt64 `` `` `` is a null reference. is not in the correct style.

  represents a number greater than or less than .

  A string that represents the number to convert. The string is interpreted by using the style specified by the parameter. A bitwise combination of enumeration values that indicates the style elements that can be present in . A typical value to specify is .

  The parameter defines the style elements (such as white space or the positive or negative sign symbol) that are allowed in the parameter for the parse operation to succeed. It must be a combination of bit flags from the enumeration.

  Depending on the value of , the parameter may include the following elements:

  [ws][$][sign]digits[.fractional_digits][E[sign]exponential_digits][ws]

  Elements in square brackets ([ and ]) are optional. If includes , the parameter may include the following elements:

  [ws]hexdigits[ws]

  The following table describes each element.

  Element

  Description

  ws

  Optional white space. White space can appear at the beginning of if includes the flag, and it can appear at the end of if includes the flag.

  $

  A culture-specific currency symbol. Its position in the string is defined by the property of the object that is returned by the method of the parameter. The currency symbol can appear in if includes the flag.

  sign

  An optional sign. (The method throws an if includes a negative sign and represents a non-zero number.) The sign can appear at the beginning of if includes the flag, and it can appear the end of if includes the flag. Parentheses can be used in to indicate a negative value if includes the flag.

  digits

  A sequence of digits from 0 through 9.

  .

  A culture-specific decimal point symbol. The current culture's decimal point symbol can appear in if includes the flag.

  fractional_digits

  One or more occurrences of the digit 0-9 if includes the flag, or one or more occurrences of the digit 0 if it does not. Fractional digits can appear in only if includes the flag.

  E

  The "e" or "E" character, which indicates that the value is represented in exponential (scientific) notation. The parameter can represent a number in exponential notation if includes the flag.

  exponential_digits

  A sequence of digits from 0 through 9. The parameter can represent a number in exponential notation if includes the flag.

  hexdigits

  A sequence of hexadecimal digits from 0 through f, or 0 through F.

  A string with decimal digits only (which corresponds to the style) always parses successfully. Most of the remaining members control elements that may be present, but are not required to be present, in this input string. The following table indicates how individual members affect the elements that may be present in .

  Non-composite NumberStyles values

  Elements permitted in in addition to digits

  Decimal digits only.

  The decimal point (.) and fractional_digits elements. However, if style does not include the flag, fractional_digits must consist of only one or more 0 digits; otherwise, an is thrown.

  The "e" or "E" character, which indicates exponential notation, along with exponential_digits.

  The ws element at the beginning of .

  The ws element at the end of .

  A sign before digits.

  A sign after digits.

  Parentheses before and after digits to indicate a negative value.

  The group separator (,) element.

  The currency ($) element.

  If the flag is used, must be a hexadecimal value. The only other flags that can be combined with it are and . (The enumeration includes a composite number style, , that includes both white-space flags.)

  If the parameter is the string representation of a hexadecimal number, it cannot be preceded by any decoration (such as 0x or &h) that differentiates it as a hexadecimal number. This causes the parse operation to throw an exception.

  The parameter is an implementation whose method returns a object that provides culture-specific information about the format of . There are three ways to use the parameter to supply custom formatting information to the parse operation:

  You can pass the actual object that provides formatting information. (Its implementation of simply returns itself.)

  You can pass a object that specifies the culture whose formatting is to be used. Its property provides formatting information.

  You can pass a custom implementation. Its method must instantiate and return the object that provides formatting information.

  If is null, the object for the current culture is used.

  Converts the string representation of a number in a specified style and culture-specific format to its 64-bit unsigned integer equivalent.

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

  A string that represents the number to convert. The string is interpreted by using the style specified by the parameter. A bitwise combination of enumeration values that indicates the style elements that can be present in . A typical value to specify is . An object that supplies culture-specific formatting information about . 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Boolean ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  true if the value of the current instance is not zero; otherwise, false.

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Byte ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to a .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Char ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to a .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.DateTime `` To be added.

  This conversion is not supported. Attempting to use this method throws an .

  This conversion is not supported. No value is returned.

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Decimal ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to a .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Double ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to a .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int16 ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to an .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int32 ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to an .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Int64 ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to an .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.SByte ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to an .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Single ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to a .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Object `` `` To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the static (Shared in Visual Basic) method.

  For a description of this member, see .

  The value of the current instance, converted to .

  An implementation that supplies information about the format of the returned value.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.UInt16 ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to a .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.UInt32 ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The recommended alternative is to call the method.

  For a description of this member, see .

  The value of the current instance, converted to a .

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.UInt64 ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

  The value of the current instance, unchanged.

  This parameter is ignored.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String

  The method formats a value in the default ("G", or general) format by using the object of the current culture. If you want to specify a different format or culture, use the other overloads of the method, as follows:

  To use format

  For culture

  Use the overload

  Default ("G") format

  A specific culture

  A specific format

  Default (current) culture

  A specific format

  A specific culture

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

  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.

  0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String ``

  The method formats a value in the default ("G", or general) format by using the object of a specified culture. If you want to specify a different format or the current culture, use the other overloads of the method, as follows:

  To use format

  For culture

  Use the overload

  Default ("G") format

  Default (current) culture

  A specific format

  Default (current) culture

  A specific format

  A specific culture

  The parameter is an implementation. Its method returns a object that provides culture-specific formatting information. However, none of the properties of the are used when formatting with the general numeric format specifier ("G").

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

  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 zeros.

  An object that supplies culture-specific formatting information. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String `` is invalid.

  This example demonstrates converting a to a string.

  `using System; public class UInt64ToStringExample { public static void Main() { UInt64 i = 64; Console.WriteLine(i); String[] formats = {"c", "d", "e", "f", "g", "n", "p", "x" }; foreach(String str in formats) Console.WriteLine("{0}: {1}", str, i.ToString(str)); } }`

  The output is

  64

  c: $64.00

  d: 64

  e: 6.400000e+001

  f: 64.00

  g: 64

  n: 64.00

  p: 6,400.00 %

  x: 40

  The method formats a value in a specified format by using a object that represents the conventions of the current culture. If you want to use the default ("G", or general) format or specify a different culture, use the other overloads of the method, as follows:

  To use format

  For culture

  Use the overload

  Default ("G") format

  Default (current) culture

  Default ("G") format

  A specific culture

  A specific format

  A specific culture

  The parameter can be any valid standard numeric format specifier, or any combination of custom numeric format specifiers. If is equal to or is null, the return value of the current object is formatted with the general format specifier ("G"). If is any other value, the method throws a .

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics:

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about support for formatting in the .NET Framework, see Formatting Types.

  The format of the returned string is determined by the object for the current culture. Depending on the parameter, this object controls symbols such as the group separator and the decimal point symbol in the output string. To provide formatting information for cultures other than the current culture, call the overload.

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

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

  A numeric format string. 0
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.String `` `` is invalid. A numeric format string.

  The method formats a value in a specified format by using the object of a specified culture. If you want to use default format or culture settings, use the other overloads of the method, as follows:

  To use format

  For culture

  Use the overload

  Default ("G") format

  Default (current) culture

  Default ("G") format

  A specific culture

  A specific format

  Default (current) culture

  The parameter can be any valid standard numeric format specifier, or any combination of custom numeric format specifiers. If is equal to or is null, the return value of the current object is formatted with the general format specifier ("G"). If is any other value, the method throws a .

  The .NET Framework provides extensive formatting support, which is described in greater detail in the following formatting topics:

  For more information about numeric format specifiers, see Standard Numeric Format Strings and Custom Numeric Format Strings.

  For more information about formatting, see Formatting Types.

  The parameter is an implementation. Its method returns a object that provides culture-specific information about the format of the string returned by this method. When the method is invoked, it calls the parameter's method and passes it a object that represents the type. The method then returns the object that provides information for formatting the current value, such as the group separator symbol or the decimal point symbol. There are three ways to use the parameter to supply formatting information to the method:

  You can pass a object that represents the culture that supplies formatting information. Its method returns the object that provides numeric formatting information for that culture.

  You can pass the actual object that provides numeric formatting information. (Its implementation of just returns itself.)

  You can pass a custom object that implements . Its method instantiates and returns the object that provides formatting information.

  If is null, the formatting of the returned string is based on the object of the current culture.

  Converts the numeric value of this instance to its equivalent string representation using the specified format and culture-specific format information.

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

  A numeric format string. An object that supplies culture-specific formatting information about this instance. 0
- Method
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Boolean `` `` To be added. To be added. To be added. To be added. To be added.
- Method
  2.0.0.0
  4.0.0.0
  System.CLSCompliant(false)
  System.Boolean `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added.
0