UInt64.MaxValue Field in C# with Examples Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The MaxValue field of UInt64 Struct is used to represent the maximum value of the 64-bit unsigned long integer. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 18446744073709551615. Its hexadecimal value is 0xFFFFFFFFFFFFFFFF. It is used to avoid the OverflowException at runtime. Syntax: public const ulong MaxValue = 18446744073709551615; Return Value: This field always returns 18446744073709551615. Example: CSharp // C# program to illustrate the // UInt64.MaxValue Field using System; class GFG { // Main Method static public void Main() { // display the Maximum // value of UInt64 struct Console.WriteLine("Maximum Value is: " + UInt64.MaxValue); // taking a variable ulong var1 = 93422337368375807; if (var1.Equals(UInt64.MaxValue)) { Console.WriteLine("Equal..!!"); Console.WriteLine("Type of var1 is: {0}", var1.GetTypeCode()); } else { Console.WriteLine("Not equal..!!"); Console.WriteLine("Type of var1 is: {0}", var1.GetTypeCode()); } } } Output: Maximum Value is: 18446744073709551615 Not equal..!! Type of var1 is: UInt64 Reference: https://learn.microsoft.com/en-us/dotnet/api/system.uint64.maxvalue?view=netstandard-2.1 Comment More infoAdvertise with us Next Article UInt32.MaxValue Field in C# with Examples A ankita_saini Follow Improve Article Tags : C# CSharp-UInt64-Struct Similar Reads UInt16.MaxValue Field in C# with Examples The MaxValue field of UInt16 Struct is used to represent the maximum value of the 16-bit unsigned integer. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 65535. Its hexadecimal value is 0xFFFF. It is used to avoid the Overflo 2 min read UInt32.MaxValue Field in C# with Examples The MaxValue field of UInt32 Struct is used to represent the maximum value of the 32-bit unsigned integer. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 4294967295. Its hexadecimal value is 0xFFFFFFFF. It is used to avoid th 2 min read UInt64.MinValue Field in C# with Examples The MinValue property or Field of UInt64 Struct is used to represent the minimum possible value of the 64-bit unsigned long integer i.e. ulong data type. The value of this field is constant means that a user cannot change the value of this field. The value of this field is 0. This prevents an Overfl 1 min read UInt16.MinValue Field in C# with Examples The MinValue field of UInt16 Struct is used to represent the minimum possible value of 16-bit unsigned integer i.e. ushort data type. The value of this field is constant means that a user cannot change the value of this field. The value of this field is 0. It also saves the program from OverflowExce 2 min read UInt32.MinValue Field in C# with Examples The MinValue Field of UInt32 Struct is used to represent the minimum possible value of 32-bit unsigned integer i.e of uint data type. The value of this field is constant means that a user cannot change the value of this field. The value of this field is 0. Syntax: public const uint MinValue = 0; Ret 1 min read Int64.MaxValue Field in C# with Examples The MaxValue field or property of Int64 Struct is used to represent the maximum value of Int64. The value of this field is constant means that the user cannot change the value of this field. The value of this field is 9223372036854775807. Its hexadecimal value is 0x7FFFFFFFFFFFFFFF. Syntax: public c 1 min read Like