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

Answer : D

Explanation

All of the above options are correct.

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 indicates that a class or structure declaration is a partial definition of the class or structure?

A - Overridable

B - Overrides

C - ParamArray

D - Partial

Answer : D

Explanation

Partial − Indicates that a class or structure declaration is a partial definition of the class or structure.

Q 6 - Which of the following statement declares the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises?

A - Dim

B - Const

C - Enum

D - Class

Answer : D

Explanation

Class − Declares the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises.

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 directive helps in collapsing and hiding sections of code in Visual Basic files?

A - #Const

B - #ExternalSource

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

D - #Region

Answer : D

Explanation

#Region − This directive helps in collapsing and hiding sections of code in Visual Basic files.

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 - Which of the following keyword of VB.NET is used to throw an exception when a problem shows up?

A - Try

B - Catch

C - Finally

D - Throw

Answer : D

Explanation

Throw − A program throws an exception when a problem shows up. This is done using a Throw keyword.


vb.net_questions_answers.htm

Advertisements