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?
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?
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?
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?
You are changing the security settings of a file named MyData.xml. You need to preserve the existing inherited access rules. You also need to prevent the access rules from inheriting changes in the future. Which code segment should you use?
You are developing a server application that will transmit sensitive information on a network. You create an X509Certificate object named certificate and a TcpClient object named client. You need to create an SslStream to communicate by using the Transport Layer Security 1.0 protocol. Which code segment should you use?
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?
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?
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?