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

A - CBool(expression)

B - CByte(expression)

C - CChar(expression)

D - CDate(expression)

Answer : D

Explanation

CDate(expression) − Converts the expression to Date data type.

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

A - CDbl(expression)

B - CDec(expression)

C - CInt(expression)

D - CLng(expression)

Answer : D

Explanation

CLng(expression) − Converts the expression to Long data type.

Q 3 - Which of the following accesss modifier is used in generic interfaces and delegates?

A - In

B - Iterator

C - Key

D - Module

Answer : A

Explanation

In − It is used in generic interfaces and delegates.

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 statement declares and defines one or more constants?

A - Dim

B - Const

C - Enum

D - Class

Answer : B

Explanation

Const − Declares and defines one or more constants.

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 returns a Type object for the specified type?

A - AddressOf

B - Await

C - GetType

D - Function Expression

Answer : C

Explanation

GetType − It returns a Type object for the specified type. The Type object provides information about the type such as its properties, methods, and events.

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.

Answer : C

Explanation

Both of the above options are correct.

vb.net_questions_answers.htm
Advertisements