C#.NET Multiple choices


Total available count: 28
Subject - Microsoft Technologies
Subsubject - C#.NET

How to use a keyword as an identifier?


 

 

 

 



B


Solution:-

C# contains reserved words that have special meaning for the compiler. These reserved words are called "keywords". Keywords cannot be used as an identifier (name of a variable, class, interface, etc.).

An identifier is a name used to identify a class, variable, function, or any other user-defined item. The basic rules for naming classes in C# are as follows − A name must begin with a letter that could be followed by a sequence of letters, digits (0 - 9), or underscore.

Although keywords are reserved words, they can be used as identifiers if @ is added as prefixes. For example, int @void; The above statement will create a variable @void of type int.




Next 5 multiple choice(s)

1

Which of the following access modifier added in C# 7.2?

2

Which of the following keyword is quite opposite to sealed?

3

Which of the following notation is incorrect?

4

What is the difference between long and double?

5

Which of the following is not a built-in reference type?

Comments