System [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.3300.0 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object Provides access to the configuration settings for the application. To be added
- Property
  System.Collections.Specialized.NameValueCollection Provides access to the <appSettings> element of the application configuration. a containing values of the keys contained in the <appSettings> element of the config file. The following example demonstrates the use of the AppSettings property. `/** * Simple demo of the dotnet Configuration management system * Building: * mcs -o ConfigurationSettingDemo.exe ConfigurationSettingDemo.cs */ using System.Configuration; using System; using System.Collections.Specialized; namespace ConfigSettingsDemos { class ConfigurationSettingDemo { public static void Main(){ // Fetch the generic settings object NameValueCollection settings=ConfigurationSettings.AppSettings; // Reference by the key name System.Console.WriteLine("The value of pi={0}",settings["pi"]); // Reference in a loop foreach(String key in settings.Keys){ System.Console.WriteLine("{0}={1}",key,settings[key]); } } } }` 1.0.5000.0 2.0.0.0 System.Obsolete("This property is obsolete. Please use System.Configuration.ConfigurationManager.AppSettings")
- Method
  System.Object `` The configuration file section to be accessed. Provides access to the configuration settings for a user defined section of the configuration file. The configuration settings for the specified section. `/** * Demo of the dotnet Configuration management system * Shows how to create your own configuration options tree and the corresponding handlers * * Building: * mcs -o ConfigurationSettingDemo2.exe ConfigurationSettingDemo2.cs * Files: * ConfigurationSettingDemo2.cs * ConfigurationSettingDemo2.exe.config */ using System.Configuration; using System; using System.Xml; namespace ConfigSettingsDemos { // Handler for settings sections containing <username> and <password> nodes class Testhandler: IConfigurationSectionHandler { public object Create(object parent, object context, XmlNode section){ string username=section["username"].InnerText; string password=section["password"].InnerText; return new DbSettings(username, password); } } // Provides ConfigurationSettings objects for application use public class DbSettings { public string username; public string password; internal DbSettings(string username, string password){ this.username=username; this.password=password; } public override string ToString() { return String.Format("server: localhost;user:{0};password:{1}",username,password); } } public class ConfigurationSettingDemo2 { public static void Main(){ // Use dbconnectivity as a starting point for configuration parsing string sectionroot="dbconnectivity"; DbSettings settings=(DbSettings)ConfigurationSettings.GetConfig(sectionroot); Console.WriteLine("DB Connectivity String is: {0}", settings); } } }` 1.0.5000.0 2.0.0.0 System.Obsolete("This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.GetSection")