How do you embed app.config in C# projects?

后端 未结 6 897
情深已故
情深已故 2020-12-10 02:15

When you compile a C# project, the app settings from app.config are saved along with the exe file. For example, if the program name is \"solve_np.exe\", there will be a \"so

6条回答
  •  生来不讨喜
    2020-12-10 02:53

    Here's another factor to consider. Seasoned .Net developers are accustomed to the standard application design, which incorporates using config files in both web apps and desktop apps. If you depart from that practice, you will make it more difficult for any developers who follow you to understand what you have done. Even sa's on the web server may be confused by the absence of a config file.

    Since pretty much everybody does it this way, your code does not look "untidy" to others. On the contrary, it would be befuddling not to see a config file where one is expected.

提交回复
热议问题