Values

Values #

C# supports a variety of types, including string, char, boolean, int, and so on.

Console.WriteLine(1 + 2);
Console.WriteLine('a');
Console.WriteLine(true);
Console.WriteLine(1 + 1 == 2);
Console.WriteLine(2.0/4.0);
Console.WriteLine(2.0F/4.0F);
Console.WriteLine("Hello");
$ dotnet run
3
a
True
True
0.5
0.5
Hello