What is the correct answer?


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

Correct Answer :

B. Dim withEvents c as new ClassName

Related Questions

If a Form is Inherited from another Form and both Forms have certain codes… If you want to open a file named "a.txt" use Dim a() as Integer-{1,2,3,4}is a valid statement If MustOverride is used then ____________ is also a must. In ListView the item that is currently selected is determined by You can assign a Main Menu to any control In HelpProvider ___________ property is used to mention the help file… A TreeView can have multiple root nodes _________ and _____________ combines to make a KeyPress event If an user-defined class have a user-defined event then, the class object… Class ccpublic _________ I as stringend classButton1_Clickcc.I=100 This view is not present in VB.NET The correct sequence of Form Loading is A thread can be started only once ________ converts to long datatype A DataSet can be updated only when the connection is open VB.NET supports Multi Level Inheritance In TreeView to collapse all the nodes of a selected node ___________ method… In OLEDB database can be accessed without using DataSet /*1. Class C2. public mustinherit sub abc()3. msgbox("Base Class")4. end… DataSet can be used to connect to Crystal Report A function can have multiple return statements VB.NET does not support control arrays If a button click event is to be fired when the user press the 'Esc' key,… ___________ is used to pass copies of a variable while __________ is used… A Class can inherit both Class and Interface at a time A user wants that custom colors are visible when the Color Dialog Box… Function abc() As StringReturn 10End Function A MsgBox can have maximum ___________ button(s) While handling keystrokes if e.Handled=True is set then Visual Basic