Question:

You are developing a custom event handler to automatically print all open documents. The event

handler helps specify the number of copies to be printed. You need to develop a custom event arguments class to pass as a parameter to the event handler. Which code segment should you use?

 

A Public Class PrintingArgs
Inherits EventArgs
Private _copies As Integer
Public Sub New(ByVal numberOfCopies As Integer)
Me._copies = numberOfCopies
End Sub
Public ReadOnly Property Copies() As Integer
Get
Return Me._copies
End Get
End Property
End Class 

B Public Class PrintingArgs
Private eventArgs As EventArgs
Public Sub New(ByVal args As EventArgs)
Me.eventArgs = args
End Sub
Public ReadOnly Property Args() As EventArgs
Get
Return eventArgs
End Get
End Property
End Class 

C Public Class PrintingArgs
Private _copies As Integer
Public Sub New(ByVal numberOfCopies As Integer)
Me._copies = numberOfCopies
End Sub
Public ReadOnly Property Copies() As Integer
Get
Return Me._copies
End Get End PropertyEnd Class 

D Public Class PrintingArgs
Inherits EventArgs
Private copies As Integer
End Class 

+ Answer
+ Report
Total Preview: 634

Copyright © 2024. Powered by Intellect Software Ltd