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 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 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 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 a declared programming element redeclares and hides an identically named element, or set of overloaded elements, in a base class?

A - Shadows

B - Shared

C - Static

D - Unicode

Answer : A

Explanation

Shadows − Specifies that a declared programming element redeclares and hides an identically named element, or set of overloaded elements, in a base class.

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 a property, and the property procedures used to store and retrieve the value of the property?

A - Sub

B - Declare

C - Operator

D - Property

Answer : D

Explanation

Property − Declares the name of a property, and the property procedures used to store and retrieve the value of the property.

Q 8 - Which of the following directive conditionally compiles selected blocks of Visual Basic code?

A - #Const

B - #ExternalSource

C - #If...Then...#Else

D - #Region

Answer : C

Explanation

#If...Then...#Else − This directive conditionally compiles selected blocks of Visual Basic code.

Q 9 - Which of the following Collection class of VB.NET represents a last-in, first out collection of object?

A - ArrayList

B - Hashtable

C - SortedList

D - Stack

Answer : D

Explanation

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

Q 10 - Which of the following block of VB.NET identifies a block of code for which particular exceptions will be activated?

A - Try

B - Catch

C - Finally

D - Throw

Answer : A

Explanation

Try − A Try block identifies a block of code for which particular exceptions will be activated. It's followed by one or more Catch blocks.


vb.net_questions_answers.htm

Advertisements
E-Books Store