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 2 - Which of the following converts the expression to Short data type in VB.NET?

A - CObj(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : C

Explanation

CShort(expression) − Converts the expression to Short data type.

Q 3 - Which of the following accesss modifier specifies that an argument is passed by reference?

A - ByRef

B - ByVal

C - Default

D - Friend

Answer : A

Explanation

ByRef − Specifies that an argument is passed by reference, i.e., the called procedure can change the value of a variable underlying the argument in the calling code.

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 one or more declared programming elements are accessible only from within their own class or from a derived class?

A - Private

B - Protected

C - Public

D - ReadOnly

Answer : B

Explanation

Protected − Specifies that one or more declared programming elements are accessible only from within their own class or from a derived class.

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 user-defined event?

A - Event

B - Delegate

C - Operator

D - Property

Answer : A

Explanation

Event − Declares a user-defined event.

Q 8 - Which of the following operator is applied to an operand in an asynchronous method or lambda expression to suspend execution of the method until the awaited task completes?

A - AddressOf

B - Await

C - GetType

D - Function Expression

Answer : B

Explanation

Await − It is applied to an operand in an asynchronous method or lambda expression to suspend execution of the method until the awaited task completes.

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 - 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