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.
Q 1 - Which of the following is a true about Object in VB.NET?
A - Object variable size is 4 bytes on 32-bit platform.
B - Object variable size is 8 bytes on 64-bit platform.
Answer : D
Explanation
All of the above options are correct.
Q 2 - Which of the following converts the expression to Long data type in VB.NET?
Answer : D
Explanation
CLng(expression) − Converts the expression to Long data type.
Q 3 - Which of the following accesss modifier is used in generic interfaces and delegates?
Answer : A
Explanation
In − It is used in generic interfaces and delegates.
Q 4 - Which of the following accesss modifier specifies that a property or procedure redeclares one or more existing properties or procedures with the same name?
Answer : D
Explanation
Overloads − Specifies that a property or procedure redeclares one or more existing properties or procedures with the same name.
Q 5 - Which of the following accesss modifier indicates that a class or structure declaration is a partial definition of the class or structure?
Answer : D
Explanation
Partial − Indicates that a class or structure declaration is a partial definition of the class or structure.
Q 6 - Which of the following statement declares the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises?
Answer : D
Explanation
Class − Declares the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises.
Q 7 - Which of the following statement declares a reference to a procedure implemented in an external file?
Answer : B
Explanation
Declare − Declares a reference to a procedure implemented in an external file.
Q 8 - Which of the following directive helps in collapsing and hiding sections of code in Visual Basic files?
Answer : D
Explanation
#Region − This directive helps in collapsing and hiding sections of code in Visual Basic files.
Q 9 - Which of the following Collection class of VB.NET uses a key to access the elements in the collection?
Answer : B
Explanation
Hashtable − It uses a key to access the elements in the collection. A Hashtable is used when you need to access elements by using key, and you can identify a useful key value. Each item in the hash table has a key/value pair. The key is used to access the items in the collection.
Q 10 - Which of the following keyword of VB.NET is used to throw an exception when a problem shows up?
Answer : D
Explanation
Throw − A program throws an exception when a problem shows up. This is done using a Throw keyword.