C# variables
Translation results:
C# is a modern, general-purpose, object-oriented programming language developed by Microsoft and approved by Ecma and ISO.
C# was developed by Anders Hejlsberg and his team during the development of the .Net framework.
C# is designed for the Common Language Infrastructure (CLI). The CLI consists of executable code and a runtime environment that allows the use of a variety of high-level languages on different computer platforms and architectures.
C# variablessyntax
A variable is nothing more than the name of a storage area for the program to operate on. In C#, each variable has a specific type, and the type determines the memory size and layout of the variable. Values within the range can be stored in memory, and a range of operations can be performed on the variables.
C# variablesexample
namespace VariableDefinition{
class Program
{
static void Main(string[] args)
{
short a;
int b ;
double c;
/* 实际初始化 */
a = 10;
b = 20;
c = a + b;
Console.WriteLine("a = {0}, b = {1}, c = {2}", a, b, c);
Console.ReadLine();
}
}}