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
How do you create user defined data types in C#?
You use the struct, class, interface, and enum constructs to create your own custom types. The .NET Framework class library itself is a collection of custom types provided by Microsoft that you can use in your own applications.
Subscribe to:
Post Comments (Atom)
Hi venkat,
ReplyDeletei got one doubt. "What are the 2 broad classifications of data types available in C#?" Isnt it value types and reference types. if i am wrong please let me know.
Thanks
Simi Sreedharan
simi u r right.ref type also cald user defnd type
ReplyDeleteno, Struct is a user defined type but is a value type
Delete"Value type and Ref Type" are the ways these data types (BildIn, UserDefined) can be used.
ReplyDelete