VOOZH about

URL: https://www.geeksforgeeks.org/c-sharp/difference-between-int64-and-uint64-in-c-sharp/

⇱ Difference between Int64 and UInt64 in C# - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Difference between Int64 and UInt64 in C#

Last Updated : 15 Jul, 2025

Int64: This Struct is used to represents 64-bit signed integer. The Int64 can store both types of values including negative and positive between the ranges of -9,223,372,036,854,775,808 to +9, 223,372,036,854,775,807

Example :

Output:

Minimum value of Int64: -9223372036854775808
Maximum value of Int64: 9223372036854775807

-3
0
1
3
7

UInt64: This Struct is used to represents 64-bit unsigned integer. The UInt64 can store only positive value only which ranges from 0 to 18,446,744,073,709,551,615.

Example :

Output:

Minimum value of UInt64: 0
Maximum value of UInt64: 18446744073709551615

13
0
1
3
7

Differences between Int64 and UInt64 in C#

Sr.No

INT64

UINT64

1.

Int64 is used to represents 64-bit signed integers .UInt64 is used to represent 64-bit unsigned integers.

2.

Int64 stands for signed integer.UInt64 stands for unsigned integer.

3.

It can store negative and positive integers.It can store only positive integers.

4.

It takes 8-bytes  space in the memory.It also takes 8-bytes space in the memory.

5.

The range of Int64 is from -9223372036854775808 to +9223372036854775807.The UInt64 ranges from 0 to 18446744073709551615.

 6.

 Syntax to declare the Int64 :

Int64 variable_name;

  Syntax to declare the UInt64:

UInt64 variable_name;
Comment

Explore