R4RIN
MCQS
VB.Net MCQ Quiz Hub
VB NET MCQ SET 3
Choose a topic to test your knowledge and improve your VB.Net skills
1. 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?
Private
Public
Protected
ReadOnly
2. Which of the following accesss modifier specifies that Visual Basic should marshal all strings to Unicode values regardless of the name of the external procedure being declared?
Shadows
Shared
Static
Unicode
3. Which of the following operator returns the address of a procedure?
AddressOf
Await
GetType
Function Expression
4. Which of the following Collection class of VB.NET represents a first-in, first out collection of object?
Queue
BitArray
SortedList
Stack
5. Which of the following keyword of VB.NET is used to throw an exception when a problem shows up?
Try
Catch
Finally
Throw
6. Which of the following converts the expression to Char data type in VB.NET?
CBool(expression)
CByte(expression)
CChar(expression)
CDate(expression)
7. Which of the following converts the expression to Long data type in VB.NET?
CDbl(expression)
CDec(expression)
CInt(expression)
CLng(expression)
8. Which of the following accesss modifier specifies that a class cannot be used as a base class?
MustInherit
MustOverride
Narrowing
NotInheritable
9. Which of the following accesss modifier allows you to pass an arbitrary number of arguments to the procedure?
Overridable
Overrides
ParamArray
Partial
10. 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?
Widening
WithEvents
WriteOnly
ReadOnly
11. Which of the following operator uses short-circuit evaluation to conditionally return one of two values?
If
Await
GetType
Function Expression
12. Which of the following is a true about Object in VB.NET?
Object variable size is 4 bytes on 32-bit platform
Object variable size is 8 bytes on 64-bit platform
Any type can be stored in a variable of type Object
All of the above
13. Which of the following converts the expression to Decimal data type in VB.NET?
CDbl(expression)
CDec(expression)
CInt(expression)
CLng(expression)
14. Which of the following accesss modifier specifies that the type is covariant?
NotOverridable
Optional
Out
Overloads
15. Which of the following accesss modifier indicates that a class or structure declaration is a partial definition of the class or structure?
Overridable
Overrides
ParamArray
Partial
16. Which of the following statement declares the operator symbol, operands, and code that define an operator procedure on a class or structure?
Sub
Declare
Operator
Property
17. 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?
AddressOf
Await
GetType
Function Expression
18. Which of the following property of Array class in VB.NET gets the rank (number of dimensions) of the Array?
Rank
LongLength
Length
None of the above
19. 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?
Try
Catch
Finally
Throw
20. Which of the following accesss modifier specifies that one or more declared member variables refer to an instance of a class that can raise events?
Widening
WithEvents
WriteOnly
ReadOnly
21. Which of the following statement declares a user-defined event?
Event
Delegate
Operator
Property
22. Which of the following Collection class of VB.NET represents an array of the binary representation using the values 1 and 0?
Queue
BitArray
SortedList
Stack
23. Which of the following converts the expression to Boolean data type in VB.NET?
CBool(expression)
CByte(expression)
CChar(expression)
CDate(expression)
24. Which of the following converts the expression to SByte data type in VB.NET?
CObj(expression)
CSByte(expression)
CShort(expression)
CSng(expression)
25. Which of the following accesss modifier specifies that a property or procedure redeclares one or more existing properties or procedures with the same name?
NotOverridable
Optional
Out
Overloads
26. Which of the following statement declares an enumeration and defines the values of its members?
Dim
Const
Enum
Class
27. Which of the following property of Array class in VB.NET checks whether the Array is readonly?
IsFixedSize
IsReadOnly
Length
None of the above
28. In Vb.net, data is handled through ………………… which facilitates development of web applications.
DAO
RDO
ADO
ADO.NET
29. A …………………… is a collection of one or more record sets as well as the relationships between those tables or record sets.
dataset
datatable
recordset
relationshipset
30. Both COM and distributed COM(DCOM) technology has been replaced by the .NET framework, although you still have access to COM through what VB.NET calls ……………
COM technlogy
COM framework
COM interoperability
COM distribution
31. ………………… is built on a disconnected data model that uses snapshots of data that are isolated from the data source.
DAO
RDO
ADO
ADO.NET
32. ………………. are based on XML schema, so they can be strongly typed.
DAO
RDO
ADO
ADO.NET
33. ………… is the ability to create procedures that can operate on objects of different types.
Abstraction
Encapsulation
Polymorphism
Inheritance
34. ……… is the process by which you can derive new classes from other classes.
Abstraction
Encapsulation
Polymorphism
Inheritance
35. ……. namespace in vb.net includes classes and interfaces that return information about types, methods and fields and also have the ability to dynamically create and invoke types.
System
System.collections
System.NET
System.Reflection
36. ……………. namespace in vb.net provides an interface to many of the protocols used on the internet.
System
System.collections
System.NET
System.Reflection
37. ……… namespace in vb.net includes essential classes and base classes that define commonly used data types, events and event handlers, interfaces, attributes, exceptions and so on.
System
System.collections
System.NET
System.Reflection
38. The file extension …………….. in vb.net represents a global application class, used to handle global application class, used to handle global ASP.NET application level events.
.asp
.asmxx
aspx
asax
39. The file extension ……………… in vb.net represents a web form.
.asmx
.asp
.aspx
.asax
40. When you save a solution, it’s give the file extension .sln and all the projects in the solution are saved with the extension ……………
.vbproj
.vbdisco
.vbs
.vb
41. The .NET platform and the .NET framework class library were developed in an effort to address these weakness of ………………….
XML
HTML
COM
DCOM
42. …. are virtual base classes; that is they consist of members; methods, properties and events that have no implementations.
Enumerations
Interfaces
Delegates
Structures
43. A …………… is a reference type that represents a strongly typed function pointer.
Enumeration
Interface
Delegate
Structure
44. Most of the primitive data types; Boolean, Byte, Char etc. defined in FCL are implemented as …………
Enumeration
Interface
Delegate
Structure
45. Specialized classes include the stack class, a last-in first-out structure, the queue class, first-in, first-out structure in the …………………… namespace.
System
System.collections
System.NET
System.Reflection
46. ………….. allow custom items of information about a program element to be stored with an assembly’s metadata.
Attributes
Structures
Exception
Data type
47. ……… datatype in .Net FCL corresponds integer data type in vb.net.
System.Int32
System.Int64
System.Int16
System.Number
48. The data data type in visual basic .net equivalent to ……………… data type in .net FCL.
System.Date
System.DateTime
System.Time
System.DateFormat
49. ………………… are symbols used to perform operations; like +, which performs addition operations, -, which performs subtraction operations and so on.
Keywords.
Operators
Variables
Expressions
50. ………… are symbolic names given to values stored in memory and declared with the Dim keyword.
Keywords
Operators
Variables
Expressions
51. The keyword ……………………, gives variables protected access, which means they are accessible only from within their own class.
Protected
Friend
Protected Friend
Private
52. The variables in ………………. access means they are accessible only from within their declaration context, including any nested procedures.
Protected
Friend
Protected Friend
Private
53. The …………….. variable is not associated with a specific instance of a class or structure.
Protected
Shared
Shadows
Friend
54. The ……………… variable are accessible from within the program that contains their declaration, as well as anywhere else in the same assembly.
Protected
Friend
Protected Friend
Private
55. …………….. is used to declare arrays; which gives upper sounds of the dimensions of an array variable.
bound
bound array
bound list
bound table
56. ……….. function in vb.net is used to convert character code to character.
Char.
Format
Convert
Chr
57. function in vb.net converts character to character code.
Chr
Val
Asc
Str
58. ……………. function in vb.net converts string to number data type.
Chr
Val
Asc
Str
59. Which of the following string handling functions and methods are used to compare two strings. i) StrComp ii) String.Compare iii) String.Equals iv) String.CompareTo
i, ii and iii only
ii, iii and iv only
i, iii and iv only
All i, ii, iii and iv
60. The string handling function, “Mid” in visual basic .net is used to …………….. i) get a substring ii) insert a substring iii) remove text iv) format string
i and ii
ii and iii
iii and iv
i and iii
61. The …………… property in array class of vb .net, returns an integer indicating the number of dimensions of the array.
sort
reverse
rank
index of
62. State the following statements are True or False for arrays in visual basic .net are i) Array are objects in vb .net ii) Array variables can have the public, protected, friend, private or protected friend specifier
True, False
False, True
True, True
False, False
63. In Int32structure ……………….. function converts the string representation of a number of its Int32 equivalent.
parse
reverse
rank
index of
64. ………………. method converts the value of the instance to a double representing the OLE Automation date.
Date CONV
TO OA Date
OLE Date
Auto Date
65. ………………… property on windows forms, gets or sets the size and location of the form on the windows desktop.
Clientsize
Size
DesktopBounds
Bounds
66. Windows forms public object property, …………….. gets or sets the bounding rectangle for the form.
Clientsize
Size
DesktopBounds
Bounds
67. ………………. method on windows forms public object methods, gets the child control that is located at the specified co-ordinates.
GetChildAtPoint
GetNextControl
GetChildControl
GetChildPoint
68. ……………. method finds the location of the specified screen point to client co-ordinates.
PointClient
GetClient
PointToClient
FocusClient
69. ……………. event occurs when a key is pressed while the form has the focus.
Keydown
Keypress
Keyup
KeyEnter
70. In the new sub procedure of windows forms, the code calls a procedure named ………………., which adds and arranges the controls in the form.
InitializeComponent
AddComponet
NewComponet
SubComponent
71. …………….. keyword is used to refer to the current object. a. b. c. d.
Current
Me
This
ThisForm
72. The possible values for the FormBorderStyle property is/are the following i) Fixed3D ii) None iii) FixedSingle iv) VariableDialog
i, ii and iii only
ii, iii and iv only
i, ii and iv only
All i, ii, iii and iv
73. Form’s ………………. property is used to specify t he initial position on the screen.
InitialPosition
StartPosition
StartScreen
InitialScreen
74. We can assign form’s start position property values from the FormStartPosition enumeration, with the following values. i) Certerpart ii) CenterScreen iii) Manual iv) Location
i, ii and iii only
ii, iii and iv only
i, ii and iv only
All i, ii, iii and iv
75. Which of the following is the correct way of assigning value “centerscreen” for form’s startposition property.
StartPosition.Form1=FormStartPosition.CenterScreen
Form1.StartPosition=CenterScreen.FormStartPosition
Form1.StartPosition=FormStartPosition.CenterScreen
Form1.StartPosition=FormStartPosition.Location.CenterScreen
76. ………….. class is built into the .Net Framework to display messages and accept input from the user.
Msgbox
MessageBox
InputBox
DisplayBox
Submit