70-536 70-536 Fragenkatalog zertifizierung-portal

70-536 70-536 Fragenkatalog zertifizierung-portal 70-536 www.zertifizierung-portal.de

Prüfungsnummer : 70-536

Prüfungsnname: TS:MS.NET Framework 2.0-Application Develop Foundation

Version : Demo

QUESTION 1
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
{
private int copies;
public PrintingArgs(int numberOfCopies)
{
this.copies = numberOfCopies;
}
public int Copies
{
get { return this.copies; }
}
}
B. public class PrintingArgs : EventArgs
{
private int copies;
public PrintingArgs(int numberOfCopies)
{
this.copies = numberOfCopies;
}
public int Copies
{
get { return this.copies; }
}
}
C. public class PrintingArgs
{
private EventArgs eventArgs;
public PrintingArgs(EventArgs ea)
{
this.eventArgs = ea;
}
public EventArgs Args
{
get { return eventArgs; }
}
}
2
D. public class PrintingArgs : EventArgs
{
private int copies;
}

Answer: B

Explanation/Reference:
Explanation: The event handler will require a parameter of type EventArgs or a derived type. The derived type in this Prüfungsnnameple will question states that the event handler helps specify the number of documents that require printing, this information will have to come from the derived EventArgs class in the form of an instance variable.

70-536 70-536 70-536 www.zertifizierung-portal.de

Hinterlasse eine Antwort