


The project system stores application settings in two XML files:Īn app.config file, which is created at design time when you create the first application settingĪ nfig file, which is created at runtime when the user who runs the application changes the value of any user setting.

You can change the type of a setting by using the Scope property. Users can change these values at runtime. User-scoped settings can be used for information such as persisting the last position of a form or a font preference. Therefore, users can't change them at runtime. These values are associated with the application. There are two types of application settings, based on scope:Īpplication-scoped settings can be used for information such as a URL for a web service or a database connection string. In addition, application settings can be bound to a property of a form or control at design time. The value is set with the Value property and must match the data type of the setting. The most common types are String, Integer, and Boolean, but you can also store values as Color, Object, or as a connection string.Īpplication settings also hold a value. The name is changed through the Name property.Īpplication settings can be stored as any data type that is serialized to XML or has a TypeConverter that implements ToString/ FromString. The name can be any combination of letters, numbers, or an underscore that doesn't start with a number, and it can't have spaces.
#Visual studio for mac exception settings code
Settings allow you to store information on the client computer that shouldn't be included in the application code (for example a connection string), user preferences, and other information you need at runtime.Īpplication settings replace the dynamic properties used in earlier versions of Visual Studio.Įach application setting must have a unique name. Applies to: Visual Studio Visual Studio for Mac Visual Studio CodeĪpplication settings enable you to store application information dynamically.
