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 1 - Which of the following is a basic data type in VB.NET?

A - Boolean

B - Byte

C - Char

D - All of the above.

Answer : D

Explanation

All of the above are basic data types.

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

A - CObj(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : B

Explanation

CSByte(expression) − Converts the expression to SByte data type.

Q 3 - Which of the following accesss modifier specifies that a function or Get accessor is an iterator?

A - In

B - Iterator

C - Key

D - Module

Answer : B

Explanation

Iterator − Specifies that a function or Get accessor is an iterator. An iterator performs a custom iteration over a collection.

Q 4 - Which of the following accesss modifier specifies that the type is covariant?

A - NotOverridable

B - Optional

C - Out

D - Overloads

Answer : C

Explanation

Out − For generic type parameters, the Out keyword specifies that the type is covariant.

Q 5 - Which of the following accesss modifier specifies that a variable or property can be read but not written?

A - Private

B - Protected

C - Public

D - ReadOnly

Answer : D

Explanation

ReadOnly − Specifies that a variable or property can be read but not written.

Q 6 - Which of the following accesss modifier specifies that a property can be written but not read?

A - Widening

B - WithEvents

C - WriteOnly

D - ReadOnly

Answer : C

Explanation

WriteOnly − Specifies that a property can be written but not read.

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 statement terminates the loop or select case statement and transfers execution to the statement immediately following the loop or select case?

A - Exit

B - Continue

C - GoTo

D - None of the above.

Answer : A

Explanation

Exit − Terminates the loop or select case statement and transfers execution to the statement immediately following the loop or select case.

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 - User-defined exception classes are derived from the ApplicationException class in VB.NET?

A - true

B - false

Answer : A

Explanation

User-defined exception classes are derived from the ApplicationException class.


vb.net_questions_answers.htm

Advertisements