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?
Which permission class should you use?
You are creating an assembly named Assembly1. Assembly1 contains a public method. The global cache contains a second assembly named Assembly2. You must ensure that the public method is only called from Assembly2.
Which permission class should you use?
Which two factors should you ascertain from the tester?
You create Microsoft Windows-based applications. You create an application that requires users to be authenticated by a domain controller. The application contains a series of processor-intensive method calls that require different database connections. A bug is reported during testing. The bug description states that the application hangs during one of the processor-intensive calls more than 50 percent of the times when the method is executed. Your unit test for the same method was successful. You need to reproduce the bug.
Which two factors should you ascertain from the tester? (Each correct answer presents part of the solution. Choose two.)
Which code segment should you use?
You create an application to send a message by e-mail. An SMTP server is available on the local subnet. The SMTP server is named smtp.contoso.com. To test the application, you use a source address, me@contoso.com, and a target address, you@contoso.com. You need to transmit the e-mail message.
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. (Click the Exhibit button.)
Which code segment should you choose?
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 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 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 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 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.)