1.
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?
2.
You are developing a class library. Portions of your code need to access system environment variables. You need to force a runtime SecurityException only when callers that are higher in the call stack do not have the necessary permissions. Which call method should you use?
3.
You write the following code to implement the CompanyClass.MyMethod function.
public class CompanyClass
{
public int MyMethod(int arg)
{
return arg;
}
}
You need to call the CompanyClass.MyMethod function dynamically from an unrelated class in your assembly. Which code segment should you use?
4.
You are creating an application that lists processes on remote computers. The application requires a method that performs the following tasks:
5.
You are developing a method to decrypt data that was encrypted with the Triple DES Algorithm.
The method accepts the following parameters:
The byte array to be decrypted, which is named cipherMessage
The key, which is named key
An initialization vector, which is named iv
You need to decrypt the message by using the TripleDES class and place the result in a string. Which code segment should you use?
6.
You need to return the contents of an isolated storage file as a string. The file is machine-scoped and is named Settings.dat. Which code segment should you use?
7.
You are developing an assembly to access file system. Need to write a segment code to configure CLR stop loading the assembly if file permssion is absent.
8.
Given the code like this:
while(!loop)
{
//Thread code here
Dowork();
}
You need to write more code to class to run DoWork() with 30-second intervals using minimum resources
9.
You create an application for your business partners to submit purchase orders. The application deserializes XML documents sent by your partners into instances of an object named PurchaseOrder. You need to modify the application so that it collects details if the deserialization process encounters any XML content that fails to map to public members of the PurchaseOrder object. What should you do?
10.
You are developing an application that will deploy by using ClickOnce. You need to test if the application executes properly. You need to write a method that returns the object, which prompts the user to install a ClickOnce application. Which code segment should you use?