Home

Visual Basic .NET 1000+ MCQ with answer for RRB JE

Thursday 9th of March 2023

Sharing is caring

1. To view Panels of a StatusBar set _________ to true
A. Panel
B. Panels
C. ShowPanel
D. ShowPanels
Answer : D
2. The default Tab of a Tab Control is
A. The first tab
B. The last tab added
C. The last tab modified
D. There is no default tab.
Answer : A
3. A form can not call itself
A. True
B. False
C.
D.
Answer : B
4. If MustOverride is used then ____________ is also a must.
A. Overridable
B. Inherits
C. MustInherit
D. None of the above
Answer : C
5. To use HelpProvider, the following properties of the form needs to be set
A. HelpButton
B. MaximizeBox
C. MinimizeBox
D. All of the above
Answer : D
6. To add controls at runtime use
A. Controls.New
B. Controls.AddNew
C. Controls.Add
D. Controls.AddItem
Answer : C
7. To redimension an array with its previous values intact use ___________ keyword
A. RedimPreserve
B. Preserve
C. Redim
D. Redim Preserve
Answer : D
8. 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
9. If a Class in inherited, its constructor is inherited automatically and it is fired automatically
A. True
B. False
C.
D.
Answer : A
10. To retrieve the default path of the project use
A. Application.Path
B. Application.DefaultPath
C. Application.StartupPath
D. Application.ProjectPath
Answer : C
11. FolderBrowserDialog displays
A. File
B. Folder
C. Drives
D. b and c
Answer : D
12. 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
13. The EventLog's ________ method is used to write an entry to a log file
A. WriteLine
B. WriteEntry
C. Add
D. Append
Answer : B
14. 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
15. In TreeView to get the node the mouse is pointing to, use
A. GetNode
B. Node
C. GetNodeAt
D. SelectNode
Answer : C
16. In OLEDB database can be accessed without using DataSet
A. True
B. False
C.
D.
Answer : A
17. In ListView the item that is currently selected is determined by
A. SelectedItem
B. Item
C. FocussedItem
D. GetSelected
Answer : C
18. If a Label control's AutoSize property is set to True, can you resize the control
A. Yes
B. No
C.
D.
Answer : B
19. A function can have multiple return statements
A. True
B. False
C.
D.
Answer : B
20. Default event handler of Splitter is
A. Splitter.Click
B. Splitter.Clicked
C. Splitter.Drag
D. None of the above
Answer : D
21. In HelpProvider ___________ property is used to mention the help file name
A. HelpFileName
B. FileName
C. HelpNamespace
D. Name
Answer : C
22. A form can have only ______ Main Menu and _________ Context Menu
A. 1,1
B. 1,Multiple
C. Multiple,1
D. 1,2
Answer : B
23. The default event handler of TextBox is
A. KeyPress
B. Changed
C. TextChanged
D. Validating
Answer : C
24. 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
25. 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
26. A DataSet can be updated only when the connection is open
A. True
B. False
C.
D.
Answer : B
27. For the same class "Me" and MyBase" are same
A. True
B. False
C.
D.
Answer : A
28. 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
29. We need multiple ErrorProviders from multiple controls.
A. True
B. False
C.
D.
Answer : B
30. Dim a() as Integer-{1,2,3,4}is a valid statement
A. True
B. False
C.
D.
Answer : A
31. A Class can inherit both Class and Interface at a time
A. True
B. False
C.
D.
Answer : A
32. Using OLEDB you can connect more than one table
A. True
B. False
C.
D.
Answer : A
33. Structured and Unstructured exceptions can't be mixed
A. True
B. False
C.
D.
Answer : B
34. A thread can be started only once
A. True
B. False
C.
D.
Answer : A
35. A user wants that custom colors are visible when the Color Dialog Box is first Opened. What should he do?
A. Set AllowFullOpen to True
B. Set AnyColor to True
C. Set Open to True
D. Set FullOpen to True
Answer : D
36. ________ converts to long datatype
A. Clong
B. CLng
C. Lng
D. None of the above
Answer : B
37. To override Finalize function the scope of the function must be
A. Private
B. Public
C. Protected
D. Static
Answer : C
38. To get details about an error use
A. Err.Message
B. Err.Desc
C. Err.Description
D. Err.Number
Answer : C
39. The Apply button automatically appears of the Font Dialog Box is opened
A. True
B. False
C.
D.
Answer : B
40. /*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
41. 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
42. In Class, Me.Show and MyClass.Show are same (Show is method name)
A. True
B. False
C.
D.
Answer : A
43. The correct sequence of Form Loading is
A. Load
B. Initialize, Load, Activate
C. Initialize, Activate, Load
D. Activate, Initialize Load
Answer : B
44. DomainUpDown control is used only for strings and NumericUpDown for numbers.
A. True
B. False
C.
D.
Answer : B
45. This view is not present in VB.NET
A. Project Explorer
B. Class View
C. Resource View
D. Server Explorer
Answer : A
46. 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
47. A DataSet can hold multiple tables even if there are similar fields
A. True
B. False
C.
D.
Answer : A
48. Application.StartupPath actually points to
A. //ProjectName
B. //ProjectName/Bin
C. //ProjectName/Debug
D. //ProjectName/Bin/ProjectName.exe
Answer : B
49. You can assign a Main Menu to any control
A. True
B. False
C.
D.
Answer : B
50. 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

Sharing is caring