long

suggest change

The long keyword is used to represent signed 64-bit integers. It is an alias for System.Int64. On .NET Framework that type lives in mscorlib.dll, which those projects reference implicitly.

Any long variable can be declared both explicitly and implicitly:

long long1 = 9223372036854775806;  // explicit declaration, long keyword used
var long2 = -9223372036854775806L; // implicit declaration, 'L' suffix used

A long variable can hold any value from –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, and can be useful in situations in which a variable must hold a value that exceeds the bounds of what other variables (such as the int variable) can hold.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents