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 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 indicates that a conversion operator (CType) converts a class or structure to a type that might not be able to hold some of the possible values of the original class or structure?

A - MustInherit

B - MustOverride

C - Narrowing

D - NotInheritable

Answer : C

Explanation

Narrowing − Indicates that a conversion operator (CType) converts a class or structure to a type that might not be able to hold some of the possible values of the original class or structure.

Q 5 - Which of the following accesss modifier specifies that one or more declared programming elements are associated with a class or structure at large, and not with a specific instance of the class or structure?

A - Shadows

B - Shared

C - Static

D - Unicode

Answer : B

Explanation

Shared − Specifies that one or more declared programming elements are associated with a class or structure at large, and not with a specific instance of the class or structure.

Q 6 - Which of the following accesss modifier indicates that a conversion operator (CType) converts a class or structure to a type that can hold all possible values of the original class or structure?

A - Widening

B - WithEvents

C - WriteOnly

D - ReadOnly

Answer : A

Explanation

Widening − Indicates that a conversion operator (CType) converts a class or structure to a type that can hold all possible values of the original class or structure.

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 operator returns the address of a procedure?

A - AddressOf

B - Await

C - GetType

D - Function Expression

Answer : A

Explanation

AddressOf − Returns the address of a procedure.

Q 9 - Which of the following property of Array class in VB.NET gets a 64-bit integer, the total number of elements in all the dimensions of the Array?

A - Rank

B - LongLength

C - Length

D - None of the above.

Answer : B

Explanation

LongLength gets a 64-bit integer that represents the total number of elements in all the dimensions of the Array.

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