c# long long_C#のlongキーワード
c# long long
C#uintキーワード(C#uint keyword)
In C#, long is a keyword which is used to declare a variable that can store a signed integer value between the range of -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. long keyword is an alias of System.Int64.
C#では、longは、−92223371203685475808〜922337203685475807の間のシンボル整数値を格納できる変数を宣言するためのキーワードである.longキーワードはSystemです.Int 64の別名.
It occupies 8 bytes (64 bits) space in the memory.
メモリに8バイト(64ビット)の容量を消費します.
Syntax:
構文:
Here, we are declaring a long variable num, initializing it with the value 12345 and printing its value, type and size of a long type variable.
ここでは、長変数numを宣言し、値12345を使用して初期化し、その値、タイプ、および長変数のサイズを印刷します.
しゅつりょくりょう
c# long long
C#uintキーワード(C#uint keyword)
In C#, long is a keyword which is used to declare a variable that can store a signed integer value between the range of -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. long keyword is an alias of System.Int64.
C#では、longは、−92223371203685475808〜922337203685475807の間のシンボル整数値を格納できる変数を宣言するためのキーワードである.longキーワードはSystemです.Int 64の別名.
It occupies 8 bytes (64 bits) space in the memory.
メモリに8バイト(64ビット)の容量を消費します.
Syntax:
構文:
long variable_name = value;
C#コードプレゼンテーションlongキーワードの例(C#code to demonstrate example of long keyword)Here, we are declaring a long variable num, initializing it with the value 12345 and printing its value, type and size of a long type variable.
ここでは、長変数numを宣言し、値12345を使用して初期化し、その値、タイプ、および長変数のサイズを印刷します.
using System;
using System.Text;
namespace Test
{
class Program
{
static void Main(string[] args)
{
//variable declaration
long num = 12345;
//printing value
Console.WriteLine("num: " + num);
//printing type of variable
Console.WriteLine("Type of num: " + num.GetType());
//printing size
Console.WriteLine("Size of a long variable: " + sizeof(long));
//printing minimum & maximum value of long
Console.WriteLine("Min value of long: " + long.MinValue);
Console.WriteLine("Max value of long: " + long.MaxValue);
//hit ENTER to exit
Console.ReadLine();
}
}
}
Output しゅつりょくりょう
num: 12345
Type of num: System.Int64
Size of a long variable: 8
Min value of long: -9223372036854775808
Max value of long: 9223372036854775807
翻訳:https://www.includehelp.com/dot-net/long-keyword-in-c-sharp.aspx c# long long