29 June, 2009

C# Interview Questions on Data Types

What are the 3 types of comments in C#?
1. Single Line Comments. You define single line comments with // as shown below.
//This is an example for single line comment
2. Multi line comments. You define multi line comments with /* */ as shown below.
/*This is an example for
Multi Line comments*/
3. XML Comments. You define XML comments with /// as shown below.
///This is an example for defining XML comments.

Is C# a strongly-typed language?
Yes

What are the 2 broad classifications of data types available in C#?
1.
Built in data types.
2. User defined data types.

Give some examples for built in datatypes in C#?
1.
int
2. float
3. bool

No comments: