PrepAway - Latest Free Exam Questions & Answers

Tag: write code segment of the configuration file

Which code segment should you use?

You create a class library that is used by applications in three departments of Domain.com.
The library contains a Department class with the following definition.
public class Department {
public string name;
public string manager;
}
Each application uses a custom configuration section to store department-specific values in the application configuration file
as shown in the following code.

Hardware
Certkiller

You need to write a code segment that creates a Department object instance by using the field values retrieved from the application configuration file.
Which code segment should you use?