In C#, UInt64 struct is used to represent 64-bit unsigned integers(also termed as the ulong data type) starting from range 0 to 18,446,744,073,709,551,615. It also provides different types of methods to compare instances of this type, convert the value of an instance to its String representation, convert the String representation of a number to an instance of this type, etc. This struct is defined under System namespace. UInt64 struct inherits the ValueType class which inherits the Object class.
|MaxValue||Represents the largest possible value of UInt64. This field is constant.|
|MinValue||Represents the smallest possible value of UInt64. This field is constant.|
Equal to MaxValue!
|CompareTo()||Compares the current instance to a specified object or UInt64 and returns an indication of their relative values.|
|Equals()||Returns a value which shows whether the current instance is equal to a specified object or UInt64.|
|GetHashCode()||Returns the hash code for the current instance.|
|GetTypeCode()||Returns the TypeCode for value type UInt64.|
|Parse()||Converts the string representation of a number to its 64-bit unsigned integer equivalent.|
|ToString()||Converts the numeric value of the current instance to its equivalent string representation.|
|TryParse()||Tries to convert the string representation of a number to its 64-bit unsigned integer equivalent. A return value indicates whether the conversion succeeded or failed.|
The hash code of myval is: -895944559
- UInt64.CompareTo() Method in C# with Examples
- UInt64.MinValue Field in C# with Examples
- UInt64.ToString() Method in C# with Examples | Set - 1
- UInt64.GetTypeCode Method in C# with Examples
- UInt64.Equals Method in C# with Examples
- UInt64.GetHashCode Method in C# with Examples
- UInt64.MaxValue Field in C# with Examples
- UInt64.ToString Method in C# with Examples | Set - 2
- UInt64.Parse(String) Method in C# with Examples
- C# | Int 64 Struct
- C# | Int32 Struct
- C# | Int16 Struct
- ValueTuple Struct in C#
- C# | UInt16 Struct
- C# | UInt32 Struct
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.