Skip to main content

Variables

Variables are where you can store information and you can use reuse them easily in code.

Datatypes

int myNum = 5;                     // Integer (whole number)
double myDecimal = 5.99; // Decimal Numbers
char alLetter = 'D'; // Character
bool myBool = true; // Boolean
string myText = "Hello World"; // String

To create a Variables a number of ways

string name = "John";
Console.WriteLine(name);

or

var name = "John";
Console.WriteLine(name);