SettingsProperty 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 SettingsProperty 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| SettingsProperty(SettingsProperty) |
根據所提供的參數初始化類別 SettingsProperty 的新實例。 |
| SettingsProperty(String) |
初始化 SettingsProperty 類別的新執行個體。 根據所提供的參數。 |
| SettingsProperty(String, Type, SettingsProvider, Boolean, Object, SettingsSerializeAs, SettingsAttributeDictionary, Boolean, Boolean) |
根據所提供的參數建立新的類別實例 SettingsProperty 。 |
SettingsProperty(SettingsProperty)
根據所提供的參數初始化類別 SettingsProperty 的新實例。
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 物件的複製品。
適用於
SettingsProperty(String)
初始化 SettingsProperty 類別的新執行個體。 根據所提供的參數。
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 物件的名稱。
適用於
SettingsProperty(String, Type, SettingsProvider, Boolean, Object, SettingsSerializeAs, SettingsAttributeDictionary, Boolean, Boolean)
根據所提供的參數建立新的類別實例 SettingsProperty 。
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 。
- propertyType
- Type
物品的種類 SettingsProperty 。
- provider
- SettingsProvider
一個 SettingsProvider 用於持久化的物件。
- isReadOnly
- Boolean
一個 Boolean 指定物件是否 SettingsProperty 唯讀的值。
- defaultValue
- Object
物件的 SettingsProperty 預設值。
- serializeAs
- SettingsSerializeAs
SettingsSerializeAs 物件。 此物件是一個列舉,用來設定儲存應用程式設定的序列化方案。
- attributes
- SettingsAttributeDictionary
- throwOnErrorDeserializing
- Boolean
一個布林值,指定當該屬性被反序列化失敗時是否會拋出錯誤。
- throwOnErrorSerializing
- Boolean
一個布林值,指定當該屬性序列化失敗時是否會拋出錯誤。