Which code segment should you use?
You are writing a method to compress an array of bytes.
The array is passed to the method in a parameter named document.
You need to compress the incoming array of bytes and return the result as an array of bytes.
Which code segment should you use?
What code must you use?
You have been asked to profile a business application that can be accessible using the Event Log API.
You have started by adding the following code to create a custom event log:
if (EventLog.SourceExists (“Application1”))
EventLog.DeleteEventSource (“Application1”);
//Create new event log
EventLog.CreateEventSource (“Application1”, “Profile”);
You need to write an event to the Application1 event log.
What code must you use?
Which code segment should you use?
You are testing a method that examines a running process.
This method returns an ArrayList containing the name and full path of all modules that are loaded by the process.
You need to list the modules loaded by a process named C:TestAppsProcess1.exe.
Which code segment should you use?
Which code segment should you use?
You are using the Microsoft Visual Studio 2005 IDE to examine the output of a method that returns a string.
You assign the output of the method to a string variable named fName. You need to write a code segment that prints the following on a single line The message:
“Test Failed: “
The value of fName if the value of fName does not equal “Certkiller” You also need to ensure that the code segment simultaneously facilitates uninterrupted execution of the application.
Which code segment should you use?
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?
What types of objects derive from te MemberInfo class?
What types of objects derive from te MemberInfo class? (Chose all that applay.)
Which code segment should you use?
You are testing a newly developed method named PersistToDB. This method accepts a parameter of type EventLogEntry.
This method does not return a value. You need to create a code segment that helps you to test the method.
The code segment must read entries from the application log of local computers and then pass the entries on to the PersistToDB method.
The code block must pass only events of type Error or Warning from the source MySource to the PersistToDB method.
Which code segment should you use?
Which code segment should you use?
You are creating a class to compare a specially-formatted string.
The default collation comparisons do not apply.
You need to implement the IComparable interface.
Which code segment should you use?
Which code segment should you use?
You are writing a custom dictionary.
The custom-dictionary class is named MyDictionary.
You need to ensure that the dictionary is type safe.
Which code segment should you use?
Which code segment should you use?
You are creating an undo buffer that stores data modifications.
You need to ensure that the undo functionality undoes the most recent data modifications first.
You also need to ensure that the undo buffer permits the storage of strings only.
Which code segment should you use?