- VB.Net Basic Tutorial
- VB.Net - Home
- VB.Net - Overview
- VB.Net - Environment Setup
- VB.Net - Program Structure
- VB.Net - Basic Syntax
- VB.Net - Data Types
- VB.Net - Variables
- VB.Net - Constants
- VB.Net - Modifiers
- VB.Net - Statements
- VB.Net - Directives
- VB.Net - Operators
- VB.Net - Decision Making
- VB.Net - Loops
- VB.Net - Strings
- VB.Net - Date & Time
- VB.Net - Arrays
- VB.Net - Collections
- VB.Net - Functions
- VB.Net - Subs
- VB.Net - Classes & Objects
- VB.Net - Exception Handling
- VB.Net - File Handling
- VB.Net - Basic Controls
- VB.Net - Dialog Boxes
- VB.Net - Advanced Forms
- VB.Net - Event Handling
- VB.Net Advanced Tutorial
- VB.Net - Regular Expressions
- VB.Net - Database Access
- VB.Net - Excel Sheet
- VB.Net - Send Email
- VB.Net - XML Processing
- VB.Net - Web Programming
- VB.Net Useful Resources
- VB.Net - Quick Guide
- VB.Net - Useful Resources
- VB.Net - Discussion
VB.Net Mock Test
This section presents you various set of Mock Tests related to VB.Net. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
VB.Net Mock Test II
Q 1 - Which of the following accesss modifier identifies a property as the default property of its class, structure, or interface?
Answer : C
Explanation
Default − Identifies a property as the default property of its class, structure, or interface.
Q 2 - Which of the following accesss modifier specifies that one or more declared programming elements are accessible from within the assembly that contains their declaration, not only by the component that declares them?
Answer : D
Explanation
Friend − Specifies that one or more declared programming elements are accessible from within the assembly that contains their declaration, not only by the component that declares them.
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 function or Get accessor is an iterator?
Answer : B
Explanation
Iterator − Specifies that a function or Get accessor is an iterator. An iterator performs a custom iteration over a collection.
Q 5 - Which of the following accesss modifier enables you to specify behavior for properties of anonymous types?
Answer : C
Explanation
Key − The Key keyword enables you to specify behavior for properties of anonymous types.
Q 6 - Which of the following accesss modifier specifies that an attribute at the beginning of a source file applies to the current assembly module?
Answer : D
Explanation
Module − Specifies that an attribute at the beginning of a source file applies to the current assembly module. It is not same as the Module statement.
Q 7 - Which of the following accesss modifier specifies that a class can be used only as a base class and that you cannot create an object directly from it?
Answer : A
Explanation
MustInherit − Specifies that a class can be used only as a base class and that you cannot create an object directly from it.
Q 8 - 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?
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 9 - Which of the following accesss modifier indicates that a conversion operator (CType) converts a class or structure to a type that might not be able to hold some of the possible values of the original class or structure?
Answer : C
Explanation
Narrowing − Indicates that a conversion operator (CType) converts a class or structure to a type that might not be able to hold some of the possible values of the original class or structure.
Q 10 - Which of the following accesss modifier specifies that a class cannot be used as a base class?
Answer : D
Explanation
NotInheritable − Specifies that a class cannot be used as a base class.
Q 11 - Which of the following accesss modifier specifies that a property or procedure cannot be overridden in a derived class?
Answer : A
Explanation
NotOverridable − Specifies that a property or procedure cannot be overridden in a derived class.
Q 12 - Which of the following accesss modifier specifies that a procedure argument can be omitted when the procedure is called?
Answer : B
Explanation
Optional − Specifies that a procedure argument can be omitted when the procedure is called.
Q 13 - Which of the following accesss modifier specifies that the type is covariant?
Answer : C
Explanation
Out − For generic type parameters, the Out keyword specifies that the type is covariant.
Q 14 - 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 15 - Which of the following accesss modifier specifies that a property or procedure can be overridden by an identically named property or procedure in a derived class?
Answer : A
Explanation
Overridable − Specifies that a property or procedure can be overridden by an identically named property or procedure in a derived class.
Q 16 - Which of the following accesss modifier specifies that a property or procedure overrides an identically named property or procedure inherited from a base class?
Answer : B
Explanation
Overrides − Specifies that a property or procedure overrides an identically named property or procedure inherited from a base class.
Q 17 - Which of the following accesss modifier allows you to pass an arbitrary number of arguments to the procedure?
Answer : C
Explanation
ParamArray − ParamArray allows you to pass an arbitrary number of arguments to the procedure. A ParamArray parameter is always declared using ByVal.
Q 18 - 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 19 - Which of the following accesss modifier specifies that one or more declared programming elements are accessible only from within their declaration context, including from within any contained types?
Answer : A
Explanation
Private − Specifies that one or more declared programming elements are accessible only from within their declaration context, including from within any contained types.
Q 20 - 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?
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 21 - Which of the following accesss modifier specifies that one or more declared programming elements have no access restrictions?
Answer : C
Explanation
Public − Specifies that one or more declared programming elements have no access restrictions.
Q 22 - Which of the following accesss modifier specifies that a variable or property can be read but not written?
Answer : D
Explanation
ReadOnly − Specifies that a variable or property can be read but not written.
Q 23 - Which of the following accesss modifier specifies that a declared programming element redeclares and hides an identically named element, or set of overloaded elements, in a base class?
Answer : A
Explanation
Shadows − Specifies that a declared programming element redeclares and hides an identically named element, or set of overloaded elements, in a base class.
Q 24 - 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?
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 25 - Which of the following accesss modifier specifies that one or more declared local variables are to continue to exist and retain their latest values after termination of the procedure in which they are declared?
Answer : C
Explanation
Static − Specifies that one or more declared local variables are to continue to exist and retain their latest values after termination of the procedure in which they are declared.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | C |
2 | D |
3 | A |
4 | B |
5 | C |
6 | D |
7 | A |
8 | B |
9 | C |
10 | D |
11 | A |
12 | B |
13 | C |
14 | D |
15 | A |
16 | B |
17 | C |
18 | D |
19 | A |
20 | B |
21 | C |
22 | D |
23 | A |
24 | B |
25 | C |