Which code segment should you use?
You are developing an application that will use custom authentication and role-based security.
You need to write a code segment to make the runtime assign an unauthenticated principal object to each running thread.
Which code segment should you use?
Which code segment should you use?
You are developing a method to decrypt data that was encrypted with the TripleDESAlgorithm. <
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?
Which code segment should you use?
You are loading a new assembly into an application.
You need to override the default evidence for the assembly.
You require the common language runtime (CLR) to grant the assembly a permission set, as if the assembly were loaded from the local intranet zone.
You need to build the evidence collection.
Which code segment should you use?
What is the right output?
Domain.com wants you to develop an application that handles passes for Domain.com’s parking lot.
The application has to store and retrieve vehicle information in a contiguous list that allows for advanced navigation techniques.
You have already written and executed the following code:
Vehicle v1, v2, v3, v4, v5;
v1 = new Vehicle (“1M2567871Y91234574”, “Nissan Silvia”, 1996);
v2 = new Vehicle (“1H2569122493456960”, “Honda Civic”, 1999);
v3 = new Vehicle (“1F2569106891234589”, “Mitsubishi Lancer”, 2001);
v4 = new Vehicle (“1F7969122491234589”, “Mazda MX7”, 1998);
v5 = new Vehicle (“1T2569122493456123”, “Toyota Supra”, 2000);
A = Nissan, Honda, Mitsubishi, Mazda, Toyota
B = Nissan, Mazda, Mitsubishi, Honda, Toyota
C = Nissan, Mazda, Mitsubishi, Toyota, Honda
D = Nissan, Mitsubishi, Mazda, Honda, Toyota
What is the right output?
Which code segment should you use?
You write the following code to call a function from the Win32 Application Programming Interface (API) by using platform invoke.
int rc = MessageBox(hWnd, text, caption, type);
You need to define a method prototype. Which code segment should you use?
Which code segment should you use?
You need to create a class definition that is interoperable along with COM.
You need to ensure that COM applications can create instances of the class and can call the GetAddress method.
Which code segment should you use?
Which code segment should you use?
You write the following code segment to call a function from the Win32 Application Programming Interface (API) by using platform invoke.
string personName = “N?el”;
string msg = “welcome ” + personName + “to club”!;
bool rc = User32API.MessageBox(0, msg, personName, 0); You need to define a method prototype that can best marshal the string data.
Which code segment should you use?
What should you do?
You are developing an application that makes use of a Queue class object named MyQueue.
This Queue class object will be used to store messages sent by the user during application run time.
You would like to access the message at the beginning of the queue, prior to processing the user messages, without removing it.
What should you do?
Which code segment should you use?
You are developing a method to hash data for later verification by using the MD5 algorithm.
The data is passed to your method as a byte array named message.
You need to compute the hash of the incoming parameter by using MD5.
You also need to place the result into a byte array.
Which code segment should you use?
What element should you add?
You have recently created a business application that references another strong-named assembly named
library.dll, and deployed it to all Domain.com users.
Subsequent to testing the applications performance, you elect to upgrade the assembly’s version to 1.1.0.0.
You need to ensure that the new version of will not affect any of Domain.com’s current users
by adding the appropriate element to the assemblyBinding element in the application configuration file.
What element should you add?