VB.Net Online Quiz



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 2 - Which of the following converts the expression to Decimal data type in VB.NET?

A - CDbl(expression)

B - CDec(expression)

C - CInt(expression)

D - CLng(expression)

Answer : B

Explanation

CDec(expression) − Converts the expression to Decimal 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 a property or procedure cannot be overridden in a derived class?

A - NotOverridable

B - Optional

C - Out

D - Overloads

Answer : A

Explanation

NotOverridable − Specifies that a property or procedure cannot be overridden in a derived class.

Q 5 - Which of the following accesss modifier specifies that one or more declared local variables are to continue to exist and retain their latest values after termination of the procedure in which they are declared?

A - Shadows

B - Shared

C - Static

D - Unicode

Answer : C

Explanation

Static − Specifies that one or more declared local variables are to continue to exist and retain their latest values after termination of the procedure in which they are declared.

Q 6 - Which of the following accesss modifier specifies that Visual Basic should marshal all strings to Unicode values regardless of the name of the external procedure being declared?

A - Shadows

B - Shared

C - Static

D - Unicode

Answer : D

Explanation

Unicode − Specifies that Visual Basic should marshal all strings to Unicode values regardless of the name of the external procedure being declared.

Q 7 - Which of the following statement declares the name of an interface and introduces the definitions of the members that the interface comprises?

A - Structure

B - Module

C - Interface

D - Function

Answer : C

Explanation

Interface − Declares the name of an interface and introduces the definitions of the members that the interface comprises.

Q 8 - Which of the following operator uses short-circuit evaluation to conditionally return one of two values?

A - If

B - Await

C - GetType

D - Function Expression

Answer : A

Explanation

If − It uses short-circuit evaluation to conditionally return one of two values. The If operator can be called with three arguments or with two arguments.

Q 9 - Which of the following Collection class of VB.NET represents ordered collection of an object that can be indexed individually?

A - ArrayList

B - Hashtable

C - SortedList

D - Stack

Answer : A

Explanation

ArrayList − It represents ordered collection of an object that can be indexed individually. It is basically an alternative to an array. However, unlike array, you can add and remove items from a list at a specified position using an index and the array resizes itself automatically. It also allows dynamic memory allocation, add, search and sort items in the list.

Answer : C

Explanation

Both of the above options are correct.

vb.net_questions_answers.htm
Advertisements