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

A - CObj(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : D

Explanation

CSng(expression) − Converts the expression to Single data type.

Q 3 - Which of the following accesss modifier identifies a property as the default property of its class, structure, or interface?

A - ByRef

B - ByVal

C - Default

D - Friend

Answer : C

Explanation

Default − Identifies a property as the default property of its class, structure, or interface.

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 are accessible only from within their declaration context, including from within any contained types?

A - Private

B - Protected

C - Public

D - ReadOnly

Answer : A

Explanation

Private − Specifies that one or more declared programming elements are accessible only from within their declaration context, including from within any contained types.

Q 6 - Which of the following accesss modifier specifies that one or more declared member variables refer to an instance of a class that can raise events?

A - Widening

B - WithEvents

C - WriteOnly

D - ReadOnly

Answer : B

Explanation

WithEvents − Specifies that one or more declared member variables refer to an instance of a class that can raise events.

Q 7 - Which of the following statement declares the operator symbol, operands, and code that define an operator procedure on a class or structure?

A - Sub

B - Declare

C - Operator

D - Property

Answer : C

Explanation

Operator − Declares the operator symbol, operands, and code that define an operator procedure on a class or structure.

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 represents a first-in, first out collection of object?

A - Queue

B - BitArray

C - SortedList

D - Stack

Answer : A

Explanation

Queue − It represents a first-in, first out collection of object. It is used when you need a first-in, first-out access of items. When you add an item in the list, it is called enqueue, and when you remove an item, it is called deque.

Q 10 - Which of the following block of VB.NET is used to execute a given set of statements, whether an exception is thrown or not thrown?

A - Try

B - Catch

C - Finally

D - Throw

Answer : C

Explanation

Finally − The Finally block is used to execute a given set of statements, whether an exception is thrown or not thrown. For example, if you open a file, it must be closed whether an exception is raised or not.

vb.net_questions_answers.htm
Advertisements