C # Read App. Config
C # reader app. config typically uses the ConfigurationManager class, but it cannot be found in the actual application process.
Generally in the writing process, in order to improve the writing efficiency, to add a reference, in the subsequent programming process can omit some prefixes. Because just want to test the app. Config file read and write, considering the use of a few times, the use of direct writing, there is no added reference, but in the actual writing process, using system.configuration, can not find the ConfigurationManager class.
Processing method: To add a reference, add a header file.
The steps are as follows:
1. First right-click on "References" in the "Solution" project and select Add Reference, as
Select "System.configration" in the pop-up window and find the
Check, click OK
2, then the code in the using System.Configuration;
C # Read App. Config