MCPD 70-536 custom print Parameters

Source: Internet
Author: User

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 shocould you use?

Translation:

You are developing to automatically print all custom events that open the documentProgram. The event provides the number of printed copies. You need to develop a Custom Event parameter class to pass parameters to the event. Which segment will you use?Code?

 

Analyze by yourself:

1Custom Event parameters must beEventargs

2, The number of printed copies must be passed

BAndDFirst selected. The number of copies is not assigned a value or a value. AllB

For an example, see C # custom events and use the Custom Event parameter method.

 

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;
Public Printingargs (eventargs EA)
{
This . Eventargs = EA;
}
Public Eventargs ARGs
{
Get { Return Eventargs ;}
}
}

D:

Public   Class Printingargs: eventargs
{
Private   Int Copies;
}

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.