Which code segment should you use?
You are developing a method to hash data with the Secure Hash 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 SHA1. You also need to place the result into a byte array named hash.
Which code segment should you use?
Which attribute should you place on the method?
You are developing a method to call a COM component. You need to use declarative security to explicitly request the runtime to perform a full stack walk. You must ensure that all callers have the required level of trust for COM interop before the callers execute your method.
Which attribute should you place on the method?
Which code segment should you use?
You are developing an auditing application to display the trusted ClickOnce applications that are installed on a computer. You need the auditing application to display the origin of each trusted application. Which code segment should you use?
Which code segment should you choose?
You are developing a utility screen for a new client application. The utility screen displays a thermometer that conveys the current status of processes being carried out by the application. You need to draw a rectangle on the screen to serve as the background of the thermometer as shown in the exhibit. The rectangle must be filled with gradient shading. (Refer to the Exhibit.) Which code segment should you choose?
Which code segment should you use?
You need to create a method to clear a Queue named q. 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?
Which criterion should the method meet?
You are developing a custom-collection class. You need to create a method in your class. You need to ensure that the method you create in your class returns a type that is compatible with the Foreach statement. Which criterion should the method meet?
Which three actions should you perform?
You are creating a class that uses unmanaged resources. This class maintains references to managed resources on other objects. You need to ensure that users of this class can explicitly release resources when the class instance ceases to be needed. Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)
Which code segment should you use?
You are developing an application that stores data about your company’s sales and technical support teams. You need to ensure that the name and contact information for each person is available as a single collection when a user queries details about a specific team. You also need to ensure that the data collection guarantees type safety. Which code segment should you use?