SettingsProperty Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Used internally as the class that represents metadata about an individual configuration property.
public ref class SettingsProperty
public class SettingsProperty
type SettingsProperty = class
Public Class SettingsProperty
- Inheritance
-
SettingsProperty
SettingsProperty is used to describe settings properties of a class derived from SettingsBase. The Settings API allows a collection of settings properties to be grouped into a common language runtime class.
When persisting settings, the SettingsBase base class asks for a collection of SettingsProperty objects, grouped in a collection of type SettingsPropertyCollection. It does this by calling its own Properties member. Inherited classes should return a collection of properties to persist.
Each SettingsProperty object includes metadata about the property, including the following:
Name.
Default value.
Property type.
Serialization method.
Provider to use for persistence.
Other arbitrary attributes that are context and provider specific.
Settings |
Initializes a new instance of the SettingsProperty class, based on the supplied parameter. |
Settings |
Creates a new instance of the SettingsProperty class based on the supplied parameters. |
Settings |
Initializes a new instance of the SettingsProperty class. based on the supplied parameter. |
Attributes |
Gets a SettingsAttributeDictionary object containing the attributes of the SettingsProperty object. |
Default |
Gets or sets the default value of the SettingsProperty object. |
Is |
Gets or sets a value specifying whether a SettingsProperty object is read-only. |
Name |
Gets or sets the name of the SettingsProperty. |
Property |
Gets or sets the type for the SettingsProperty. |
Provider |
Gets or sets the provider for the SettingsProperty. |
Serialize |
Gets or sets a SettingsSerializeAs object for the SettingsProperty. |
Throw |
Gets or sets a value specifying whether an error will be thrown when the property is unsuccessfully deserialized. |
Throw |
Gets or sets a value specifying whether an error will be thrown when the property is unsuccessfully serialized. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: