Variables
A Variable is a simple storage location for data.
Data can be assigned and retrieved from a variable.
The interpretation of data in a variable is controlled
through “Types”
Variables are declared using this form of statement: type var-name;
where type
is the data type of the variable and var-name
is its name
Data Types
C# is a strongly typed language.
The C# typing system contains the following
categories: Value types Reference types Variables of the value types store data, while those
of the reference types store references to the actual data. Reference types are also referred to as objects. Value types store the data on the stack and Reference
types stores the data on the heap .
Operators
C# provides an
extensive set of operators that give the programmer detailed control over the
construction and evaluation of expressions. Most of C#’s operators fall into the following
categories:
arithmetic,
bit wise,
relational, and
logical.
|