You are in the process of creating an application for Domain.com’s Human Resources department that tracks employee benefits.
You have to store current employee data without recompiling the application.
You elect to store this employee data as a custom section in the application configuration file.
The relevant portion of the application configuration file is shown in the following exhibit:
<?xml version=”1.0″ encoding=”utf-8″ ?>
<configuration>
<configSections>
</configSections>
<!– Begin Custom Section –>
<EmployeeSection type=”fulltime”>
<Employee name=”Rory Allen” />
</EmployeeSection>
<!– End Custom Section –>
</configuration>
You want to use the .NET 2.0 Configuration API to access the custom section.
You need to ensure that programmatic access of the EmployeeSection element is enabled.
What should you do? (Choose two)
A.
Create a custom section handler class that inherits the ConfigurationSection class.
B.
Add a section element to the EmployeeSection element of the application configuration file.
C.
Create a custom section handler class that implements the IConfigurationSectionHandler interface.
D.
Add an EmployeeSection element to the configSections element of the application configuration file.
E.
Create a custom section handler class that implements the IApplicatioSettingsProvider interface.
F.
Add a section element to the configSections element of the application configuration file.
Explanation:
To enable programmatic access of the EmployeeSection element, you should create a custom section handler class that inherits the ConfigurationSection class and
add a section element to the configSections element of the application configuration file.
Why not C,F?
For A: ConfigurationSection is a class, not interface
Thanks, I fixed it.