[go: up one dir, main page]

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

A - CDbl(expression)

B - CDec(expression)

C - CInt(expression)

D - CLng(expression)

Answer : A

Explanation

CDbl(expression) − Converts the expression to Double data type.

Q 2 - Which of the following accesss modifier specifies that an attribute at the beginning of a source file applies to the entire assembly?

A - Ansi

B - Assembly

C - Async

D - Auto

Answer : B

Explanation

Assembly − Specifies that an attribute at the beginning of a source file applies to the entire assembly.

Q 3 - Which of the following accesss modifier enables you to specify behavior for properties of anonymous types?

A - In

B - Iterator

C - Key

D - Module

Answer : C

Explanation

Key − The Key keyword enables you to specify behavior for properties of anonymous types.

Q 4 - Which of the following accesss modifier specifies that a procedure argument can be omitted when the procedure is called?

A - NotOverridable

B - Optional

C - Out

D - Overloads

Answer : B

Explanation

Optional − Specifies that a procedure argument can be omitted when the procedure is called.

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 the operator symbol, operands, and code that define an operator procedure on a class or structure?

A - Sub

B - Declare

C - Operator

D - Property

Answer : C

Explanation

Operator − Declares the operator symbol, operands, and code that define an operator procedure on a class or structure.

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 32-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 : C

Explanation

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

Q 10 - Which of the following block of VB.NET identifies a place to catch an exception with an exception handler at the place in a program where you want to handle the problem?

A - Try

B - Catch

C - Finally

D - Throw

Answer : B

Explanation

Catch − A program catches an exception with an exception handler at the place in a program where you want to handle the problem. The Catch keyword indicates the catching of an exception.

vb.net_questions_answers.htm
Advertisements