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 converts the expression to Byte data type in VB.NET?

A - CBool(expression)

B - CByte(expression)

C - CChar(expression)

D - CDate(expression)

Answer : B

Explanation

CByte(expression) − Converts the expression to Byte data type.

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

A - CStr(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : A

Explanation

CStr(expression) − Converts the expression to String data type.

Q 3 - Which of the following accesss modifier indicates that the method or lambda expression that it modifies is asynchronous?

A - Ansi

B - Assembly

C - Async

D - Auto

Answer : C

Explanation

Async − Indicates that the method or lambda expression that it modifies is asynchronous. Such methods are referred to as async methods. The caller of an async method can resume its work without waiting for the async method to finish.

Q 4 - Which of the following accesss modifier specifies that a class cannot be used as a base class?

A - MustInherit

B - MustOverride

C - Narrowing

D - NotInheritable

Answer : D

Explanation

NotInheritable − Specifies that a class cannot be used as a base class.

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 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 name, parameters, and code that define a Function procedure?

A - Structure

B - Module

C - Interface

D - Function

Answer : D

Explanation

Function − Declares the name, parameters, and code that define a Function procedure.

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 Collection class of VB.NET represents ordered collection of an object that can be indexed individually?

A - ArrayList

B - Hashtable

C - SortedList

D - Stack

Answer : A

Explanation

ArrayList − It represents ordered collection of an object that can be indexed individually. It is basically an alternative to an array. However, unlike array, you can add and remove items from a list at a specified position using an index and the array resizes itself automatically. It also allows dynamic memory allocation, add, search and sort items in the list.

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