C # Read App. Config

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.