Home

Visual Basic .NET 1000+ MCQ with answer for CLAT PG

Thursday 9th of March 2023

Sharing is caring

1. 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
2. For the same class "Me" and MyBase" are same
A. True
B. False
C.
D.
Answer : A
3. To uninstall a Windows Service ____________ is use
A. Installutil -I
B. Installutil -e
C. Installutil -u
D. Installutil -d
Answer : C
4. /*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
5. The default event handler of TextBox is
A. KeyPress
B. Changed
C. TextChanged
D. Validating
Answer : C
6. If a Label control's AutoSize property is set to True, can you resize the control
A. Yes
B. No
C.
D.
Answer : B
7. ___________ 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
8. A Class can inherit both Class and Interface at a time
A. True
B. False
C.
D.
Answer : A
9. A DataSet can hold multiple tables even if there are similar fields
A. True
B. False
C.
D.
Answer : A
10. 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
11. ________ converts to long datatype
A. Clong
B. CLng
C. Lng
D. None of the above
Answer : B
12. 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
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. To add items stored in an array to a ListView use
A. List1.Add(name of the array)
B. List1.AddItem(name of the array)
C. List1.Items.Add(name of the array)
D. List1.Items.Addrange(name of the array)
Answer : D
15. To redimension an array with its previous values intact use ___________ keyword
A. RedimPreserve
B. Preserve
C. Redim
D. Redim Preserve
Answer : D
16. The Apply button automatically appears of the Font Dialog Box is opened
A. True
B. False
C.
D.
Answer : B
17. In ADODB the _____________ property is used to connect to the table
A. RecordSet
B. DataSource
C. RecordSource
D. Connection
Answer : A
18. This view pops up if "Ctrl+F1" is pressed
A. Help
B. Properties Window
C. Dynamic Help
D. Server Explorer
Answer : C
19. 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
20. Class cc
public _________ I as string
end class
Button1_Click
cc.I=100

A. Share
B. Shared
C. Global
D. Static
Answer : B
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. In ListView the item that is currently selected is determined by
A. SelectedItem
B. Item
C. FocussedItem
D. GetSelected
Answer : C
23. If MustOverride is used then ____________ is also a must.
A. Overridable
B. Inherits
C. MustInherit
D. None of the above
Answer : C
24. If nothing is selected in a combo box, its index value is
A. -1
B. 0
C. 1
D. Null
Answer : A
25. 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
26. To retrieve the default path of the project use
A. Application.Path
B. Application.DefaultPath
C. Application.StartupPath
D. Application.ProjectPath
Answer : C
27. 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
28. Finally is fired only when error occurs
A. True
B. False
C.
D.
Answer : B
29. We need multiple ErrorProviders from multiple controls.
A. True
B. False
C.
D.
Answer : B
30. A form can have only one default button
A. True
B. False
C.
D.
Answer : A
31. Default event handler of Splitter is
A. Splitter.Click
B. Splitter.Clicked
C. Splitter.Drag
D. None of the above
Answer : D
32. FolderBrowserDialog displays
A. File
B. Folder
C. Drives
D. b and c
Answer : D
33. In reports ___________ property help to assign user-defined criteria
A. ReportSource
B. SectionFormula
C. Query
D. SelectionFormula
Answer : D
34. A single OLEDBAdapter can have many DataSets
A. True
B. False
C.
D.
Answer : A
35. 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
36. Structured and Unstructured exceptions can't be mixed
A. True
B. False
C.
D.
Answer : B
37. Two commands can be written in the same line using
A. :
B. ;
C. ,
D. .
Answer : A
38. VB.NET does not support control arrays
A. True
B. False
C.
D.
Answer : A
39. 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
40. 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
41. Images can be loaded from
A. Images.FromFile
B. BitMap.FromFile
C. System.FromFile
D. Both a and b
Answer : D
42. 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
43. /*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
44. DataSet can be used to connect to Crystal Report
A. True
B. False
C.
D.
Answer : A
45. To call a buttons click event use
A. Button1.Click
B. Button1.PerformClick
C. Button1.Clicked
D. None of the above
Answer : B
46. On error goto lbl is a
A. Structured error
B. Unstructured error
C.
D.
Answer : B
47. /*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
48. Using MyBase you can call base class
A. Constructor
B. Method
C. Variables
D. All of the above
Answer : D
49. In OLEDB database can be accessed without using DataSet
A. True
B. False
C.
D.
Answer : A
50. 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

Sharing is caring