You are on page 1of 3

Topic C#

To use preprocessing directives


in our program, we use the using
keyeord:

To indicate the end of the


statement, we use the following ;
symbol:

To indicate the statement as


multiline, we use the following we don’t use any symbol to indicate multi line
symbol

In console applications, we
should keep the main method class whose name is same as that of the file name.
in:

To indicate comments, we use


single line: //, Multi line: /*..*/, documentation ///
the following symbols:

How to use keywords as


prefix the keyword with @ symbol
identifiers

Case sensitivity Case sensitive


bool,char, byte, short, int, long, float, double,
primitive data types:
decimal, string
char: ' ', long: L, float: f, double: d, decimal: m,
literal type indicators:
string " "

implicit and explicit conversions Present and Explicit conversion is done by: (data
of data types: type) variable
Declaring constants: const Datatype variable = value
Declaring and initializing two or
int i=0, j=1, k=3;
more variables in the same line
Total numbe of keywords: 77
VB

Imports

we use carriage return (Enter)

we use _(Underscore) symbol to indicate that


the statement is a mutiline

module whose name is same as the name of


the file name.

single line: ' or REM

put the keyword in square brackets[].

Case insensitiv
Boolean, Char, Date, Byte, Short, Integer, Long,
Single, Double, Decimal
Char: " "c, Date: #mm/dd/yy#, Short: S,
integer: I or nothing,Long: L, Single: F, Double:
R, Decimal: D,
Present and explicit conversion is done by using
functions as Ctype (varisble).
Const variable As datatype = value

Dim I As integer =1, j As double = 2

-
JAVA

import

we use ;

we don’t use any symbol to indicate multi line

class whose name is same as that of the file name.

single line: //, Multi line: /*..*/, documentation /** */

ther is no way to use the keyword as identifier.

Case sensitive

boolean, char, byte, short, int, long, float, double

char: ' ', long: L, float: F, Double: D

Present and explicit conversion is done by (data type)


variable
final Datatype variable = value

int I =2, j, k=3;

49

You might also like