Variable definition : Variable Definition « Language Basics « C# / CSharp Tutorial






A variable is a named memory location that can be assigned a value.

To declare a variable, you will use a statement like this:

type var-name;
  1. type specifies the type of variable being declared
  2. var-name is the name of the variable.
1.8.Variable Definition
1.8.1.Variable definition
1.8.2.Define and assign value to variables
1.8.3.Dynamic initialization.