Day 39

Syntax

type variableName = value;

Where type is a C# type (such as int or string), and variableName is the name of the variable (such as x or name). The equal sign is used to assign values to the variable.

To create a variable that should store text, look at the following example:

Example

Create a variable called name of type stringand assign it the value "John":

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

Comments

Popular posts from this blog

Day 2 Talking about computer science 💻

Day 5💻

Day 12 “C comments”