Share via


ProfileSettingsCollection.Item[] 屬性

定義

取得或設定指定的 ProfileSettings 物件。

多載

Item[Int32]

取得或設定集合中指定數值索引處的 ProfileSettings 物件。

Item[String]

根據集合中指定之索引鍵,取得 ProfileSettings 物件。

Item[Int32]

取得或設定集合中指定數值索引處的 ProfileSettings 物件。

public:
 property System::Web::Configuration::ProfileSettings ^ default[int] { System::Web::Configuration::ProfileSettings ^ get(int index); void set(int index, System::Web::Configuration::ProfileSettings ^ value); };
public System.Web.Configuration.ProfileSettings this[int index] { get; set; }
member this.Item(int) : System.Web.Configuration.ProfileSettings with get, set
Default Public Property Item(index As Integer) As ProfileSettings

參數

index
Int32

集合中 ProfileSettings 物件的索引。

屬性值

位於指定索引處的 ProfileSettings 物件;如果該索引處沒有任何物件,則為 null

範例

下列程式碼範例示範如何使用 Item[] 方法。 此程式碼範例是提供給 類別之較大範例的 HealthMonitoringSection 一部分。

profileSetting = healthMonitoringSection.Profiles[i];
profileSetting = healthMonitoringSection.Profiles(i)

另請參閱

適用於

Item[String]

根據集合中指定之索引鍵,取得 ProfileSettings 物件。

public:
 property System::Web::Configuration::ProfileSettings ^ default[System::String ^] { System::Web::Configuration::ProfileSettings ^ get(System::String ^ key); };
public System.Web.Configuration.ProfileSettings this[string key] { get; }
member this.Item(string) : System.Web.Configuration.ProfileSettings
Default Public ReadOnly Property Item(key As String) As ProfileSettings

參數

key
String

包含在集合中的 ProfileSettings 物件名稱。

屬性值

ProfileSettings 物件。

適用於