How to use Int64 in C#
Asked Answered
C

4

19

The question is easy! How do you represent a 64 bit int in C#?

Congener answered 2/10, 2010 at 10:2 Comment(1)
@Lucero, It should be asked and answered on SO. So point to a duplicate or let it be.Railroad
B
39

64 bit int is long

Berne answered 2/10, 2010 at 10:4 Comment(0)
B
16

System.Int64 is the .net type, in C# it's also called long

Bacon answered 2/10, 2010 at 10:4 Comment(0)
R
10

A signed 64 bit integer is long, an unsigned is ulong.

The corresponding types in the framwwork are System.Int64 and System.UInt64, respectively.

Example:

long bigNumber = 9223372036854775807;
Rostellum answered 2/10, 2010 at 10:8 Comment(0)
E
5

By using the long data type, or ulong for unsigned.

Table of Integral C# Types

Epigraphy answered 2/10, 2010 at 10:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.