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?
You create a method that runs by using the credentials of the end user. You need to use Microsoft Windows groups to authorize the user. You must add a code segment that identifies whether a user is in the local group
named Clerk. Which code segment should you use?
You are testing a component that serializes the Meeting class instances so that they can be saved to the file system. The Meeting class has the following definition:
public ref class Meeting {
private :
String= title;
public :
int roomNumber;
array= invitees;
Meeting(){}
Meeting(String= t){
title = t;
}
};
The component contains a procedure with the following code segment.
Meeting= myMeeting = gcnew Meeting("Goals");
myMeeting->roomNumber=1100;
array= attendees = gcnew array(2)
{"John", "Mary"};
myMeeting->invitees = attendees;
XmlSerializer= xs = gcnew XmlSerializer(__typeof(Meeting));
StreamWriter= writer = gcnew StreamWriter("C:\\Meeting.xml");
xs->Serialize(writer, myMeeting);
writer->Close();
You need to identify the XML block that is written to the C:\Meeting.xml file as a result of running this procedure.
Which XML block represents the content that will be written to the C:\Meeting.xml file?
You are developing a fiscal report for a customer. Your customer has a main office in the United States and a
satellite office in Mexico. You need to ensure that when users in the satellite office generate the report, the
current date is displayed in Mexican Spanish format. Which code segment should you use?
You need to write a code segment that performs the following tasks:
Retrieves the name of each paused service.
Passes the name to the Add method of Collection1.
Which code segment should you use?
You write the following code. public delegate void FaxDocs(object sender, FaxArgs args); You need to create an event that will invoke FaxDocs. Which code segment should you use?
You are creating a class named Age.
You need to ensure that the Age class is written such that collections of Age objects can be sorted. Which code
segment should you use?
You are creating a class that performs complex financial calculations.
The class contains a method named GetCurrentRate that retrieves the current interest rate and a variable
named currRate that stores the current interest rate.
You write serialized representations of the class. You need to write a code segment that updates the currRate
variable with the current interest rate when an instance of the class is deserialized.
Which code segment should you use?
You are developing a server application that will transmit sensitive information on a network. You create an
X509Certificate object named certificate and a TcpClient object named client. You need to create an SslStream
to communicate by using the Transport Layer Security 1.0 protocol. Which code segment should you use?