Home

Visual Basic .NET MCQ Solved Paper for XAT

Thursday 9th of March 2023

Sharing is caring

1. The correct sequence of Form Loading is
A. Load
B. Initialize, Load, Activate
C. Initialize, Activate, Load
D. Activate, Initialize Load
Answer : B
2. A Class can inherit both Class and Interface at a time
A. True
B. False
C.
D.
Answer : A
3. Images can be loaded from
A. Images.FromFile
B. BitMap.FromFile
C. System.FromFile
D. Both a and b
Answer : D
4. If a form call another form and the caller form is closed through code, then both forms are disposed
A. True
B. False
C.
D.
Answer : A
5. DataSet can be used to connect to Crystal Report
A. True
B. False
C.
D.
Answer : A
6. Using ADODB multiple tables can be connected at a time
A. True
B. False
C.
D.
Answer : B
7. In TreeView to collapse all the nodes of a selected node ___________ method is used
A. CollapseAll
B. Collapse
C. Any one of the above
D. None of the above
Answer : B
8. In ListView the item that is currently selected is determined by
A. SelectedItem
B. Item
C. FocussedItem
D. GetSelected
Answer : C
9. The name of the IDE window that allows you to see the hierarchical arrangement of the files in your project is
A. Server Explorer
B. Project Explorer
C. Solution Explorer
D. None of the above
Answer : C
10. If MustOverride is used then ____________ is also a must.
A. Overridable
B. Inherits
C. MustInherit
D. None of the above
Answer : C
11. The default location of the exe file of your solution is
A. ..../Project folder name
B. .../Project folder name/Bin
C. .../Project folder name/Debug
D. .../Project folder name/Debug/Bin
Answer : B
12. To display multiple columns in ListView the View property must be set to
A. SmallIcon
B. LargeIcon
C. Details
D. List
Answer : C
13. To uninstall a Windows Service ____________ is use
A. Installutil -I
B. Installutil -e
C. Installutil -u
D. Installutil -d
Answer : C
14. /*1. Class C
2. public notoverridable sub abc()
3. msgbox("Base Class")
4. end sub
5. end Class /* The Error in Line No.

A. 2
B. 3
C. 4
D. No Error
Answer : A
15. Finally is fired only when error occurs
A. True
B. False
C.
D.
Answer : B
16. Dim a() as Integer-{1,2,3,4}is a valid statement
A. True
B. False
C.
D.
Answer : A
17. To get details about an error use
A. Err.Message
B. Err.Desc
C. Err.Description
D. Err.Number
Answer : C
18. PasswordChar property of a TextBox can accept " " (space) as the password char
A. True
B. False
C.
D.
Answer : B
19. We need multiple ErrorProviders from multiple controls.
A. True
B. False
C.
D.
Answer : B
20. This view is not present in VB.NET
A. Project Explorer
B. Class View
C. Resource View
D. Server Explorer
Answer : A
21. This view pops up if "Ctrl+F1" is pressed
A. Help
B. Properties Window
C. Dynamic Help
D. Server Explorer
Answer : C
22. VB.NET supports Multi Level Inheritance
A. True
B. False
C.
D.
Answer : A
23. FolderBrowserDialog displays
A. File
B. Folder
C. Drives
D. b and c
Answer : D
24. If a Label control's AutoSize property is set to True, can you resize the control
A. Yes
B. No
C.
D.
Answer : B
25. Get method is used to
A. Assign a value to an user control
B. Read value from an user control
C. Both of the above
D. None of the above
Answer : A
26. To redimension an array with its previous values intact use ___________ keyword
A. RedimPreserve
B. Preserve
C. Redim
D. Redim Preserve
Answer : D
27. Default event handler of Splitter is
A. Splitter.Click
B. Splitter.Clicked
C. Splitter.Drag
D. None of the above
Answer : D
28. _________ actually updates the values in a DataSet permanently
A. OleDataAdapterq1.update(DataSet1,"emp")
B. DataSet1.Merge(DataSet1)
C. DataSet1.AcceptChanges()
D. DataSet1.Update()
Answer : C
29. Data from DataSet is accessed using34
A. Binding Obejct
B. BindContext Object
C. BindingContext Object
D. EndCurrentEdit Object
Answer : C
30. Using MyBase you can call base class
A. Constructor
B. Method
C. Variables
D. All of the above
Answer : D
31. In ADODB the _____________ property is used to connect to the table
A. RecordSet
B. DataSource
C. RecordSource
D. Connection
Answer : A
32. To view Panels of a StatusBar set _________ to true
A. Panel
B. Panels
C. ShowPanel
D. ShowPanels
Answer : D
33. In HelpProvider ___________ property is used to mention the help file name
A. HelpFileName
B. FileName
C. HelpNamespace
D. Name
Answer : C
34. /*1. Class C
2. public mustinherit sub abc()
3. msgbox("Base Class")
4. end sub
5. end Class /* The error is in line no.

A. 1
B. 2
C. 3
D. 4
Answer : A
35. A MsgBox can have maximum ___________ button(s)
A. 1
B. 2
C. 3
D. 4
Answer : C
36. A DataSet can hold multiple tables even if there are similar fields
A. True
B. False
C.
D.
Answer : A
37. Dim S as Integer=10
Text1=S
Msgbox(Text1.Text)

A. Will return error
B. Will return 10
C. Will return 0
D. Will return Null
Answer : A
38. When a project is Built it creates a _______ and ________ file under Bin directory
A. .exe, .sln
B. .exe, .dll
C. .dll, .sln
D. .exe, .ocx
Answer : B
39. In OLEDB database can be accessed without using DataSet
A. True
B. False
C.
D.
Answer : A
40. What cannot be done if the table has no primary key
A. Insert and Update
B. Update and Delete
C. Select and Delete
D. Insert and Select
Answer : B
41. dim arr(10) as string,
the max index of the array is

A. 9
B. 10
C. Can be >10 also
D. None of the above
Answer : B
42. If you want to open a file named "a.txt" use
A. System.diagnostics.Start("a.txt")
B. System.Start("a.txt")
C. System.diagnostics.Process.Start("a.txt")
D. System.Process.Start("a.txt")
Answer : C
43. If a Class in inherited, its constructor is inherited automatically and it is fired automatically
A. True
B. False
C.
D.
Answer : A
44. ___________ is used to pass copies of a variable while __________ is used to pass address of a variable.
A. Byval, Byref
B. Byref, Byval
C. Any one of the above
D. None of the above
Answer : A
45. To make a button the default button, this property of the form must be set
A. DefaultButton
B. AcceptButton
C. DialogResult
D. None of the above
Answer : B
46. This property of TrackBar is not present
A. TickStyle.Both
B. TickStyle.None
C. TickStyle.TopLeft
D. TickStyle.BottomLeft
Answer : D
47. ScrollBars can be added to
A. Panel
B. GroupBox
C. Both a and b
D. None of the above
Answer : A
48. A TreeView can have multiple root nodes
A. True
B. False
C.
D.
Answer : A
49. The SelectionMode property of a CheckedList Box can be set only to
A. One
B. MultiSimple
C. MultiExtended
D. None of the abvove
Answer : A
50. A single LinkLabel can support multiple links
A. True
B. False
C.
D.
Answer : A

Sharing is caring