DOT NET
Dot net is object-oriented programming language.
Path setting for dot net:
Variable:
Used to store the value.
Syntax: data-type var-name;
Data types:
Int:
Size is 4 bytes.
Char:
Size is 2 bytes.
Byte:
Size is 1 byte.
Boolean:
Contains true or false.
Float:
Size is 4 bytes.
Double:
Size is 8 bytes.
Short:
Size is 2 bytes.
Hello world program:
Loops:
Used to execute a statement or group of statements for multiple times.
For loop:
Syntax: for(init;condition;inc/dec)
{
//Statements
}
Example:
While:
Syntax: while(condition){
//Statement
inc/dec;
}
Example:
Do-while:
Syntax: do{
//Statement
inc/dec;
}while(condition);
Example:
Loop control statement:
Break.
Continue.
Conditional execution:
Checks the condition and prints the statement.
If:
Checks the condition and print the statement.
If-else:
Checks the condition and print the statement other wise it prints the false statement.
Switch:
String concatenation:
Partial string:
Starting index of string:
Count the no of occurrence of sub-string and replace in string:
User input:
Functions and calling functions:
Used to call repeatedly.
Mathematical functions:
Abs(): Returns the absolute value.
Ceiling(): Returns the no greater than or equal to no.
Fix(): Returns integer portion of no.
Floor(): Returns the no less than or equal to no.
Max(): Returns the greater than no.
Min(): Returns the less than no.
Round(): Rounds the no up on 5 decimal places.
Sign(): Returns the sign of a no. It gives -1 if negative, +1 if positive.
File Creating:
File Writing:
File Reading:
Reading a particular line from file:
First Non repeated Character:
Highest repeated character:
Pyramid:
Digit Identification:
Graphic function:
Database connection: