PrepAway - Latest Free Exam Questions & Answers

What should you do?

You work as the application developer at Domain.com. Domain.com uses Visual Studio.NET 2005 as its application development platform.
You are developing a .NET Framework 2.0 Web application and are busy creating a Configuration object in your application that inherits
settings from the applications’ web.config file and machine.config file.
You modify several of the Configuration objects settings and want to save the Configuration object to a file named testconf.config.
You require only the values that differ from the inherited values to be written to the configuration file.
What should you do? (Choose two)

PrepAway - Latest Free Exam Questions & Answers

A.
The Save method on the Configuration object should be called

B.
The ConfigurationSaveMode.Full value must be passed as a parameter

C.
The ConfigurationSaveMode.Modified value must be passed as a parameter

D.
The SaveAs method on the Configuration object should be called

E.
The ConfigurationSaveMode.Minimal value should be passed as a parameter

Explanation:
When you are required to write configuration settings to a different file the SaveAs method should be called. If you wish to write only values which differ from inherited values the ConfigurationSaveMode.Minimal value should be passed as a parameter.
Incorrect Answers:
A: This method is used to have the SaveAs method to save all the values to the configuration file that you specified in the scenario.
B: This method is used to have the SaveAs method to only the modified values to the configuration file that you specified in the scenario.

One Comment on “What should you do?


Leave a Reply