SettingsProperty 构造函数
定义
初始化 SettingsProperty 类的新实例。Initializes a new instance of the SettingsProperty class.
重载
| SettingsProperty(SettingsProperty) |
根据所提供的参数初始化 SettingsProperty 类的新实例。Initializes a new instance of the SettingsProperty class, based on the supplied parameter. |
| SettingsProperty(String) |
初始化 SettingsProperty 类的新实例。Initializes a new instance of the SettingsProperty class. 根据提供的参数。based on the supplied parameter. |
| SettingsProperty(String, Type, SettingsProvider, Boolean, Object, SettingsSerializeAs, SettingsAttributeDictionary, Boolean, Boolean) |
根据提供的参数创建 SettingsProperty 类的新实例。Creates a new instance of the SettingsProperty class based on the supplied parameters. |
SettingsProperty(SettingsProperty)
根据所提供的参数初始化 SettingsProperty 类的新实例。Initializes a new instance of the SettingsProperty class, based on the supplied parameter.
public:
SettingsProperty(System::Configuration::SettingsProperty ^ propertyToCopy);
public SettingsProperty (System.Configuration.SettingsProperty propertyToCopy);
new System.Configuration.SettingsProperty : System.Configuration.SettingsProperty -> System.Configuration.SettingsProperty
Public Sub New (propertyToCopy As SettingsProperty)
参数
- propertyToCopy
- SettingsProperty
指定现有 SettingsProperty 对象的副本。Specifies a copy of an existing SettingsProperty object.
适用于
SettingsProperty(String)
初始化 SettingsProperty 类的新实例。Initializes a new instance of the SettingsProperty class. 根据提供的参数。based on the supplied parameter.
public:
SettingsProperty(System::String ^ name);
public SettingsProperty (string name);
new System.Configuration.SettingsProperty : string -> System.Configuration.SettingsProperty
Public Sub New (name As String)
参数
- name
- String
指定现有 SettingsProperty 对象的名称。Specifies the name of an existing SettingsProperty object.
适用于
SettingsProperty(String, Type, SettingsProvider, Boolean, Object, SettingsSerializeAs, SettingsAttributeDictionary, Boolean, Boolean)
根据提供的参数创建 SettingsProperty 类的新实例。Creates a new instance of the SettingsProperty class based on the supplied parameters.
public:
SettingsProperty(System::String ^ name, Type ^ propertyType, System::Configuration::SettingsProvider ^ provider, bool isReadOnly, System::Object ^ defaultValue, System::Configuration::SettingsSerializeAs serializeAs, System::Configuration::SettingsAttributeDictionary ^ attributes, bool throwOnErrorDeserializing, bool throwOnErrorSerializing);
public SettingsProperty (string name, Type propertyType, System.Configuration.SettingsProvider provider, bool isReadOnly, object defaultValue, System.Configuration.SettingsSerializeAs serializeAs, System.Configuration.SettingsAttributeDictionary attributes, bool throwOnErrorDeserializing, bool throwOnErrorSerializing);
new System.Configuration.SettingsProperty : string * Type * System.Configuration.SettingsProvider * bool * obj * System.Configuration.SettingsSerializeAs * System.Configuration.SettingsAttributeDictionary * bool * bool -> System.Configuration.SettingsProperty
Public Sub New (name As String, propertyType As Type, provider As SettingsProvider, isReadOnly As Boolean, defaultValue As Object, serializeAs As SettingsSerializeAs, attributes As SettingsAttributeDictionary, throwOnErrorDeserializing As Boolean, throwOnErrorSerializing As Boolean)
参数
- name
- String
SettingsProperty 对象的名称。The name of the SettingsProperty object.
- propertyType
- Type
SettingsProperty 对象的类型。The type of SettingsProperty object.
- provider
- SettingsProvider
用于持久性的 SettingsProvider 对象。A SettingsProvider object to use for persistence.
- isReadOnly
- Boolean
一个 Boolean 值,指定 SettingsProperty 对象是否为只读。A Boolean value specifying whether the SettingsProperty object is read-only.
- defaultValue
- Object
SettingsProperty 对象的默认值。The default value of the SettingsProperty object.
- serializeAs
- SettingsSerializeAs
SettingsSerializeAs 对象。A SettingsSerializeAs object. 此对象是用于设置存储应用程序设置的序列化方案的枚举。This object is an enumeration used to set the serialization scheme for storing application settings.
- attributes
- SettingsAttributeDictionary
SettingsAttributeDictionary 对象。A SettingsAttributeDictionary object.
- throwOnErrorDeserializing
- Boolean
一个布尔值,指定未成功反序列化属性时是否引发错误。A Boolean value specifying whether an error will be thrown when the property is unsuccessfully deserialized.
- throwOnErrorSerializing
- Boolean
一个布尔值,指定未成功序列化属性时是否引发错误。A Boolean value specifying whether an error will be thrown when the property is unsuccessfully serialized.