Home

Visual Basic .NET MCQ Solved Paper for ESIC

Thursday 9th of March 2023

Sharing is caring

1. In ADODB the _____________ property is used to connect to the table
A. RecordSet
B. DataSource
C. RecordSource
D. Connection
Answer : A
2. 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
3. This view is not present in VB.NET
A. Project Explorer
B. Class View
C. Resource View
D. Server Explorer
Answer : A
4. 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
5. To view Panels of a StatusBar set _________ to true
A. Panel
B. Panels
C. ShowPanel
D. ShowPanels
Answer : D
6. If nothing is selected in a combo box, its index value is
A. -1
B. 0
C. 1
D. Null
Answer : A
7. In OLEDB database can be accessed without using DataSet
A. True
B. False
C.
D.
Answer : A
8. VB.NET supports Multi Level Inheritance
A. True
B. False
C.
D.
Answer : A
9. In TreeView to get the node the mouse is pointing to, use
A. GetNode
B. Node
C. GetNodeAt
D. SelectNode
Answer : C
10. This view pops up if "Ctrl+F1" is pressed
A. Help
B. Properties Window
C. Dynamic Help
D. Server Explorer
Answer : C
11. /*1. OleDataAdapterq1.update(DataSet1,"emp")
2. OleDataAdapterq1.update(DataSet1,"std")
3. DataSet1.Merge(DataSet1)
4. DataSet1.AcceptChanges()
/* The error is in line

A. 2
B. 4
C. 3
D. No Error
Answer : D
12. To vertically arrange all forms in an MDI form use
A. Me.Layout(MdiLayout.TileVertical)
B. Me.MdiLayout(MdiLayout.TileVertical)
C. Me.LayoutMdi(MdiLayout.TileVertical)
D. Nothing is required because default is Vertical
Answer : C
13. 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
14. 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
15. To override Finalize function the scope of the function must be
A. Private
B. Public
C. Protected
D. Static
Answer : C
16. ScrollBars can be added to
A. Panel
B. GroupBox
C. Both a and b
D. None of the above
Answer : A
17. If a button click event is to be fired when the user press the 'Esc' key, set the buttons name against forms _________ property
A. DefaultButton
B. AcceptButton
C. DialogResult
D. CancelButton
Answer : D
18. Only derived class can have shadows keyword
A. True
B. False
C.
D.
Answer : A
19. 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
20. DataSet can be used to connect to Crystal Report
A. True
B. False
C.
D.
Answer : A
21. To display multiple columns in ListView the View property must be set to
A. SmallIcon
B. LargeIcon
C. Details
D. List
Answer : C
22. 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
23. 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
24. VB.NET does not support control arrays
A. True
B. False
C.
D.
Answer : A
25. Function abc() As String
Return 10
End Function

A. Will produce compilation error
B. Will produce runtime error
C. The function will execute normally
D. None of the above
Answer : A
26. If an user-defined class have a user-defined event then, the class object is declared as
A. Dim c as new ClassName
B. Dim withEvents c as new ClassName
C. Dim c as ClassName
D. Dim withEvents c as ClassName
Answer : B
27. If a Label control's AutoSize property is set to True, can you resize the control
A. Yes
B. No
C.
D.
Answer : B
28. A form can not call itself
A. True
B. False
C.
D.
Answer : B
29. While handling keystrokes if e.Handled=True is set then Visual Basic
A. Will handle the key
B. Will not handle the key
C. Will send the key to Garbage collector
D. None of the above
Answer : B
30. Structured and Unstructured exceptions can't be mixed
A. True
B. False
C.
D.
Answer : B
31. You create a UserControl having a TextBox and include that in a separate Form. Can you use all the properties of the TextBox in the UserControl from that Form?
A. Yes
B. No
C.
D.
Answer : B
32. A form can have only one default button
A. True
B. False
C.
D.
Answer : A
33. If a Form is Inherited from another Form and both Forms have certain codes in their respective Form_Load event, then while running the program
A. Only the first Forms code will be executed
B. Only the second Forms code will be executed
C. Both Forms code will be executed
D. None of the above
Answer : C
34. A single LinkLabel can support multiple links
A. True
B. False
C.
D.
Answer : A
35. Finally is fired only when error occurs
A. True
B. False
C.
D.
Answer : B
36. Using OLEDB you can connect more than one table
A. True
B. False
C.
D.
Answer : A
37. To add controls at runtime use
A. Controls.New
B. Controls.AddNew
C. Controls.Add
D. Controls.AddItem
Answer : C
38. Using ADODB multiple tables can be connected at a time
A. True
B. False
C.
D.
Answer : B
39. In reports ___________ property help to assign user-defined criteria
A. ReportSource
B. SectionFormula
C. Query
D. SelectionFormula
Answer : D
40. You can assign a Main Menu to any control
A. True
B. False
C.
D.
Answer : B
41. Set 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.
Answer : B
42. _________ 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
43. ___________ 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
44. FolderBrowserDialog displays
A. File
B. Folder
C. Drives
D. b and c
Answer : D
45. 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
46. 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
47. If Option Explicit is on then Dim i as Integer="10" will produce an error
A. True
B. False
C.
D.
Answer : B
48. To call a buttons click event use
A. Button1.Click
B. Button1.PerformClick
C. Button1.Clicked
D. None of the above
Answer : B
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 thread can be started only once
A. True
B. False
C.
D.
Answer : A

Sharing is caring