Home

1000+ Visual Basic .NET Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. 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
2. ScrollBars can be added to
A. Panel
B. GroupBox
C. Both a and b
D. None of the above
Answer : A
3. Using OLEDB you can connect more than one table
A. True
B. False
C.
D.
Answer : A
4. _________ 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
5. VB.NET does not support control arrays
A. True
B. False
C.
D.
Answer : A
6. Only derived class can have shadows keyword
A. True
B. False
C.
D.
Answer : A
7. In reports ___________ property help to assign user-defined criteria
A. ReportSource
B. SectionFormula
C. Query
D. SelectionFormula
Answer : D
8. For the same class "Me" and MyBase" are same
A. True
B. False
C.
D.
Answer : A
9. ___________ 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
10. In ADODB the _____________ property is used to connect to the table
A. RecordSet
B. DataSource
C. RecordSource
D. Connection
Answer : A
11. 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
12. 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
13. ________ converts to long datatype
A. Clong
B. CLng
C. Lng
D. None of the above
Answer : B
14. 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
15. 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
16. This view pops up if "Ctrl+F1" is pressed
A. Help
B. Properties Window
C. Dynamic Help
D. Server Explorer
Answer : C
17. If Scrollbars property of a TextBox is set to Hortizontal and the WordWrap property is also set to true. Which one will get precedence
A. Scrollbars
B. WordWrap
C. No precedence both will work
D.
Answer : B
18. Two commands can be written in the same line using
A. :
B. ;
C. ,
D. .
Answer : A
19. FolderBrowserDialog displays
A. File
B. Folder
C. Drives
D. b and c
Answer : D
20. To print use
A. PrintDialog1.Print()
B. PrintDocument1.Print()
C. Printer1.Print()
D. None of the above
Answer : B
21. Finally is fired only when error occurs
A. True
B. False
C.
D.
Answer : B
22. 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
23. To call a buttons click event use
A. Button1.Click
B. Button1.PerformClick
C. Button1.Clicked
D. None of the above
Answer : B
24. A DataSet can hold multiple tables even if there are similar fields
A. True
B. False
C.
D.
Answer : A
25. The Apply button automatically appears of the Font Dialog Box is opened
A. True
B. False
C.
D.
Answer : B
26. 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
27. 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
28. A Class can inherit both Class and Interface at a time
A. True
B. False
C.
D.
Answer : A
29. To retrieve the default path of the project use
A. Application.Path
B. Application.DefaultPath
C. Application.StartupPath
D. Application.ProjectPath
Answer : C
30. Class cc
public _________ I as string
end class
Button1_Click
cc.I=100

A. Share
B. Shared
C. Global
D. Static
Answer : B
31. 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
32. In TreeView to get the node the mouse is pointing to, use
A. GetNode
B. Node
C. GetNodeAt
D. SelectNode
Answer : C
33. To get details about an error use
A. Err.Message
B. Err.Desc
C. Err.Description
D. Err.Number
Answer : C
34. If MustOverride is used then ____________ is also a must.
A. Overridable
B. Inherits
C. MustInherit
D. None of the above
Answer : C
35. 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
36. DataSet can be used to connect to Crystal Report
A. True
B. False
C.
D.
Answer : A
37. A form can have only one default button
A. True
B. False
C.
D.
Answer : A
38. We need multiple ErrorProviders from multiple controls.
A. True
B. False
C.
D.
Answer : B
39. To add controls at runtime use
A. Controls.New
B. Controls.AddNew
C. Controls.Add
D. Controls.AddItem
Answer : C
40. If nothing is selected in a combo box, its index value is
A. -1
B. 0
C. 1
D. Null
Answer : A
41. PasswordChar property of a TextBox can accept " " (space) as the password char
A. True
B. False
C.
D.
Answer : B
42. To uninstall a Windows Service ____________ is use
A. Installutil -I
B. Installutil -e
C. Installutil -u
D. Installutil -d
Answer : C
43. Using ADODB multiple tables can be connected at a time
A. True
B. False
C.
D.
Answer : B
44. To view Panels of a StatusBar set _________ to true
A. Panel
B. Panels
C. ShowPanel
D. ShowPanels
Answer : D
45. Structured and Unstructured exceptions can't be mixed
A. True
B. False
C.
D.
Answer : B
46. If a Label control's AutoSize property is set to True, can you resize the control
A. Yes
B. No
C.
D.
Answer : B
47. 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
48. In Class, Me.Show and MyClass.Show are same (Show is method name)
A. True
B. False
C.
D.
Answer : A
49. This view is not present in VB.NET
A. Project Explorer
B. Class View
C. Resource View
D. Server Explorer
Answer : A
50. Data from DataSet is accessed using34
A. Binding Obejct
B. BindContext Object
C. BindingContext Object
D. EndCurrentEdit Object
Answer : C

Sharing is caring