System 2.0.0.0 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Property | System.AttributeTargets.All)

A settings provider often supports more than one of the .NET Framework standard serialization schemes. These schemes are outlined by the enumeration, and include plain text, XML, and binary serialization. In addition, a provider may optionally support a custom serialization scheme.

With the , you can specify which serialization mechanism should be used for a given application settings class or property. This attribute is considered a request to the settings provider. It may be ignored or cause an error if the provider or the individual property type does not support the specified serialization scheme. If this attribute is not present, the provider will usually provide a default serialization mechanism, most commonly plain text.

Although the settings provider may provide a way to dynamically change the serialization mechanism during run time, this is not a typical capability.

Specifies the serialization mechanism that the settings provider should use. This class cannot be inherited.

- Constructor
  2.0.0.0
  4.0.0.0

  If the settings provider or the type of the property to be converted does not support the serialization scheme specified by the parameter, the operation may have one of the following results:

  The settings provider may ignore the attribute and use its default serialization scheme.

  The serialization process may fail without a response. The application settings property will not be persisted.

  An exception may be raised during serialization.

  Initializes an instance of the class.

  A enumerated value that specifies the serialization scheme.
- Property
  2.0.0.0
  4.0.0.0
  System.Configuration.SettingsSerializeAs To be added.

  This property is set in the constructor.

  Gets the enumeration value that specifies the serialization scheme.