General information
Category:
The Mere Mortals .NET Framework
To determine the path and name of the application configuration file at run time, you can use the ConfigurationFile property of the current application domain object (this works for both Windows Forms and ASP .NET applications).
For example, in C#:
// Get the current application domain object
System.AppDomain domain = System.Threading.Thread.GetDomain();
// Get the path and name of the application configuration file
string config = domain.SetupInformation.ConfigurationFile;
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only