VB.Net Online Quiz


Advertisements


Following quiz provides Multiple Choice Questions (MCQs) related to VB.Net. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 1 - Which of the following converts the expression to Boolean data type in VB.NET?

A - CBool(expression)

B - CByte(expression)

C - CChar(expression)

D - CDate(expression)

Answer : A

Explanation

CBool(expression) − Converts the expression to Boolean data type.

Q 2 - Which of the following converts the expression to Object data type in VB.NET?

A - CObj(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : A

Explanation

CObj(expression) − Converts the expression to Object data type.

Q 3 - Which of the following accesss modifier enables you to specify behavior for properties of anonymous types?

A - In

B - Iterator

C - Key

D - Module

Answer : C

Explanation

Key − The Key keyword enables you to specify behavior for properties of anonymous types.

Q 4 - Which of the following accesss modifier specifies that an attribute at the beginning of a source file applies to the current assembly module?

A - In

B - Iterator

C - Key

D - Module

Answer : D

Explanation

Module − Specifies that an attribute at the beginning of a source file applies to the current assembly module. It is not same as the Module statement.

Q 5 - Which of the following accesss modifier specifies that a variable or property can be read but not written?

A - Private

B - Protected

C - Public

D - ReadOnly

Answer : D

Explanation

ReadOnly − Specifies that a variable or property can be read but not written.

Q 6 - Which of the following statement declares and allocates storage space for one or more variables?

A - Dim

B - Const

C - Enum

D - Class

Answer : A

Explanation

Dim − Declares and allocates storage space for one or more variables.

Q 7 - Which of the following statement is used to declare a delegate?

A - Event

B - Delegate

C - Operator

D - Property

Answer : B

Explanation

Delegate − Used to declare a delegate.

Q 8 - Which of the following statement causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating?

A - Exit

B - Continue

C - GoTo

D - None of the above.

Answer : B

Explanation

Continue − Causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.

Q 9 - Which of the following property of Array class in VB.NET checks whether the Array is readonly?

A - IsFixedSize

B - IsReadOnly

C - Length

D - None of the above.

Answer : B

Explanation

IsReadOnly gets a value indicating whether the Array is readonly.

Q 10 - The finally block is used to execute a given set of statements, whether an exception is thrown or not thrown.

A - true

B - false

Answer : A

Explanation

The finally block is used to execute a given set of statements, whether an exception is thrown or not thrown.


vb.net_questions_answers.htm

Advertisements