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

Answer : D

Explanation

All of the above options are correct.

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 specifies that an argument is passed by reference?

A - ByRef

B - ByVal

C - Default

D - Friend

Answer : A

Explanation

ByRef − Specifies that an argument is passed by reference, i.e., the called procedure can change the value of a variable underlying the argument in the calling code.

Q 4 - Which of the following accesss modifier specifies that a property or procedure can be overridden by an identically named property or procedure in a derived class?

A - Overridable

B - Overrides

C - ParamArray

D - Partial

Answer : A

Explanation

Overridable − Specifies that a property or procedure can be overridden by an identically named property or procedure in a derived class.

Q 5 - Which of the following accesss modifier specifies that one or more declared programming elements have no access restrictions?

A - Private

B - Protected

C - Public

D - ReadOnly

Answer : C

Explanation

Public − Specifies that one or more declared programming elements have no access restrictions.

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

A - Widening

B - WithEvents

C - WriteOnly

D - ReadOnly

Answer : C

Explanation

WriteOnly − Specifies that a property can be written but not read.

Q 7 - Which of the following statement declares a user-defined event?

A - Event

B - Delegate

C - Operator

D - Property

Answer : A

Explanation

Event − Declares a user-defined event.

Q 8 - Which of the following operator declares the parameters and code that define a function lambda expression?

A - AddressOf

B - Await

C - GetType

D - Function Expression

Answer : D

Explanation

Function Expression − It declares the parameters and code that define a function lambda expression.

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.

Q 10 - Which of the following block of VB.NET identifies a place to catch an exception with an exception handler at the place in a program where you want to handle the problem?

A - Try

B - Catch

C - Finally

D - Throw

Answer : B

Explanation

Catch − A program catches an exception with an exception handler at the place in a program where you want to handle the problem. The Catch keyword indicates the catching of an exception.

vb.net_questions_answers.htm
Advertisements