Indicates the location of the configuration file for the current AppDomain.
Object
Selector
Internal.UrlSelectorBase
FileSelector
AppDomainSelector
[Visual Basic] Public Class AppDomainSelector Inherits FileSelector [C#] public class AppDomainSelector : FileSelector [C++] public __gc class AppDomainSelector : public FileSelector [JScript] public class AppDomainSelector extends FileSelector
Instead of directly specifying a file location, applications can read from their own configuration file by using the AppDomainSelector instead of a FileSelector. The AppDomainSelector retrieves the location of the configuration file from the currently running application domain:
Tip The AppDomainSelector.Argument method retrieves the file path to the application configuration file.
Namespace: System.Configuration
Assembly: System.Configuration.dll
[C#]
[C#] using System.Configuration; using System.Configuration.Core; IConfigCollection bindings = ConfigManager.Get("BindingPolicy", new AppDomainSelector()); foreach (bindingredir in bindings) { Console.WriteLine(bindingredir.Name+": "+bindingredir.Version); }