ApplicationSettingsBase.Item[String] 屬性

定義

取得或設定指定應用程式設定屬性的值。

public:
 virtual property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ propertyName); void set(System::String ^ propertyName, System::Object ^ value); };
public override object this[string propertyName] { get; set; }
member this.Item(string) : obj with get, set
Default Public Overrides Property Item(propertyName As String) As Object

參數

propertyName
String

String,包含要存取的屬性名稱。

屬性值

如果找到,則為已命名設定屬性的值,否則為 null

例外狀況

沒有與目前包裝函式相關的屬性,或找不到指定屬性。

已嘗試設定唯讀屬性。

在設定作業期間,提供之值的型別與設定屬性不相容。

無法剖析組態檔。

備註

屬性 Item[] 也稱為索引器,常用於衍生自 ApplicationSettingsBase的設定包裝函式類別。 Item[] 將包裝函式類別的 public 屬性系結至對應的 settings 屬性。

Item[] 會根據所執行的作業引發數個事件:

適用於

另請參閱