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 String data type in VB.NET?

A - CStr(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : A

Explanation

CStr(expression) − Converts the expression to String data type.

Q 3 - Which of the following accesss modifier indicates that the method or lambda expression that it modifies is asynchronous?

A - Ansi

B - Assembly

C - Async

D - Auto

Answer : C

Explanation

Async − Indicates that the method or lambda expression that it modifies is asynchronous. Such methods are referred to as async methods. The caller of an async method can resume its work without waiting for the async method to finish.

Q 4 - Which of the following accesss modifier specifies that a property or procedure is not implemented in this class and must be overridden in a derived class before it can be used?

A - MustInherit

B - MustOverride

C - Narrowing

D - NotInheritable

Answer : B

Explanation

MustOverride − Specifies that a property or procedure is not implemented in this class and must be overridden in a derived class before it can be used.

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 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 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 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 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 - The finally block is used to execute a given set of statements, whether an exception is thrown or not thrown.

A - true

B - false

Answer : A

Explanation

The finally block is used to execute a given set of statements, whether an exception is thrown or not thrown.


vb.net_questions_answers.htm

Advertisements