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 in such a way that the called procedure or property cannot change the value of a variable underlying the argument in the calling code?

A - ByRef

B - ByVal

C - Default

D - Friend

Answer : B

Explanation

ByVal − Specifies that an argument is passed in such a way that the called procedure or property cannot 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 redeclares one or more existing properties or procedures with the same name?

A - NotOverridable

B - Optional

C - Out

D - Overloads

Answer : D

Explanation

Overloads − Specifies that a property or procedure redeclares one or more existing properties or procedures with the same name.

Q 5 - Which of the following accesss modifier allows you to pass an arbitrary number of arguments to the procedure?

A - Overridable

B - Overrides

C - ParamArray

D - Partial

Answer : C

Explanation

ParamArray − ParamArray allows you to pass an arbitrary number of arguments to the procedure. A ParamArray parameter is always declared using ByVal.

Q 6 - Which of the following accesss modifier indicates that a conversion operator (CType) converts a class or structure to a type that can hold all possible values of the original class or structure?

A - Widening

B - WithEvents

C - WriteOnly

D - ReadOnly

Answer : A

Explanation

Widening − Indicates that a conversion operator (CType) converts a class or structure to a type that can hold all possible values of the original class or structure.

Q 7 - Which of the following statement declares a reference to a procedure implemented in an external file?

A - Sub

B - Declare

C - Operator

D - Property

Answer : B

Explanation

Declare − Declares a reference to a procedure implemented in an external file.

Q 8 - Which of the following operator is applied to an operand in an asynchronous method or lambda expression to suspend execution of the method until the awaited task completes?

A - AddressOf

B - Await

C - GetType

D - Function Expression

Answer : B

Explanation

Await − It is applied to an operand in an asynchronous method or lambda expression to suspend execution of the method until the awaited task completes.

Q 9 - Which of the following Collection class of VB.NET uses a key to access the elements in the collection?

A - ArrayList

B - Hashtable

C - SortedList

D - Stack

Answer : B

Explanation

Hashtable − It uses a key to access the elements in the collection. A Hashtable is used when you need to access elements by using key, and you can identify a useful key value. Each item in the hash table has a key/value pair. The key is used to access the items in the collection.

Q 10 - User-defined exception classes are derived from the ApplicationException class in VB.NET?

A - true

B - false

Answer : A

Explanation

User-defined exception classes are derived from the ApplicationException class.

vb.net_questions_answers.htm
Advertisements