Is it possible to use a ".net configuration" file for a .NET console application?
I'm looking for an equivalent to web.config, but specifically for console applications...
I can certainly roll my own, but If I can use .NET's built in configuration reader then I would like to do that...I really just need to store a connection string...
Thanks
Yes - use app.config.
Exactly the same syntax, options, etc. as web.config, but for console and WinForms applications.
To add one to your project, right-click the project in Solution Explorer, Add..., New Item... and pick "Application Configuration File" from the Templates box.
app.config... If you have an App.config in your project, it will get copied as executableName.exe.config in the case of a console application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With