Information générale
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
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;
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement