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 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 one or more declared programming elements have no access restrictions?

A - Private

B - Protected

C - Public

D - ReadOnly

Answer : C

Explanation

Public − Specifies that one or more declared programming elements have no access restrictions.

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 is used to declare a delegate?

A - Event

B - Delegate

C - Operator

D - Property

Answer : B

Explanation

Delegate − Used to declare a delegate.

Q 8 - Which of the following operator declares the parameters and code that define a function lambda expression?

A - AddressOf

B - Await

C - GetType

D - Function Expression

Answer : D

Explanation

Function Expression − It declares the parameters and code that define a function lambda expression.

Q 9 - Which of the following property of Array class in VB.NET gets the rank (number of dimensions) of the Array?

A - Rank

B - LongLength

C - Length

D - None of the above.

Answer : A

Explanation

Rank gets the rank (number of 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