简体   繁体   English

如何在C#中使用Int64

[英]How to use Int64 in C#

The question is easy! 问题很简单! How do you represent a 64 bit int in C#? 你如何在C#中表示64位int?

64位int很长

A signed 64 bit integer is long , an unsigned is ulong . 带符号的64位整数很long ,无符号的是ulong

The corresponding types in the framwwork are System.Int64 and System.UInt64 , respectively. framwwork中的相应类型分别是System.Int64System.UInt64

Example: 例:

long bigNumber = 9223372036854775807;

By using the long data type, or ulong for unsigned. 通过使用long数据类型,或ulong为unsigned。

Table of Integral C# Types 整数C#类型表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM