Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1) Keywords
2) Identifiers
3) Literals
4) Operators
5) Punctuators
KEYWORDS :
They are the reserved words which has specific meaning to it,
that cannot be used as an identifier , except when they are
prefaced by @ character.
IDENTIFIERS ::
They are the symbols used for grouping and separating code.
It includes ::
Parantheses()
Braces {}
Brackets []
Semicolon ;
Colon :
Comma ,
Period .
STATEMENTS :
It includes :
Empty statements
Labeled statements
Declaration statements
Expression statements
Selection statements
Interaction statements
Jump statements
Try statements
Checked statements
Unchecked statements
Lock statements
Using statements
LITERALS ::
1) Numeric Literals.
Integer Literals
Real Literals
2) Character Literals
3) Boolean Literals.
Some pre-defined Backslash Literals:
Constants Meaning
\a Alert
\b Back space
\n New line
\r Carriage return
\t Horizontal tab
\v Vertical tab
\ Single Quote
\ Double Quote
\\ Back slash
\o null
VARIABLES :
Data Types :
Data types specify the types and size of the values that can be
stored in an variable. C# is language rich in its datatypes.
Pre-defined types :
a. Integers.
b. Real nos
c. Booleans
d. Characters
a. Enumerations
b. Structures
2) Reference Types :
Predefined Types :
a. Objects
b. Strings
a. Classes
b. Arrays
c. Interfaces
d. Delegates
3) Pointers.
Default Values :
The scope of the variable is the region of the code within which
the variable can be accessed.
Class ABC
Static int m;
Int n;
Int j=0;
M as static variable
N is instance variable
X is a value parameter
Y is reference parameter
Z is output parameter
A is an array element
J is a local variable
Static and instance variables are declared at the class level and
are known as fields. Scope of these variables begins at their
declaration and ends when Main Terminates.
Since int and long are not objects they cannot be used to call
methods.
Eg :
int m=10;
int m=10;
object om= m ;