Export (0) Print
Expand All

SettingsProperty Class

Used internally as the class that represents metadata about an individual configuration property.

System.Object
  System.Configuration.SettingsProperty

Namespace:  System.Configuration
Assembly:  System (in System.dll)

public class SettingsProperty

The SettingsProperty type exposes the following members.

  NameDescription
Public methodSettingsProperty(SettingsProperty)Initializes a new instance of the SettingsProperty class, based on the supplied parameter.
Public methodSettingsProperty(String)Initializes a new instance of the SettingsProperty class. based on the supplied parameter.
Public methodSettingsProperty(String, Type, SettingsProvider, Boolean, Object, SettingsSerializeAs, SettingsAttributeDictionary, Boolean, Boolean)Creates a new instance of the SettingsProperty class based on the supplied parameters.
Top

  NameDescription
Public propertyAttributesGets a SettingsAttributeDictionary object containing the attributes of the SettingsProperty object.
Public propertyDefaultValueGets or sets the default value of the SettingsProperty object.
Public propertyIsReadOnlyGets or sets a value specifying whether a SettingsProperty object is read-only.
Public propertyNameGets or sets the name of the SettingsProperty.
Public propertyPropertyTypeGets or sets the type for the SettingsProperty.
Public propertyProviderGets or sets the provider for the SettingsProperty.
Public propertySerializeAsGets or sets a SettingsSerializeAs object for the SettingsProperty.
Public propertyThrowOnErrorDeserializingGets or sets a value specifying whether an error will be thrown when the property is unsuccessfully deserialized.
Public propertyThrowOnErrorSerializingGets or sets a value specifying whether an error will be thrown when the property is unsuccessfully serialized.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft