語言

ProfileSettingsCollection.Item[] 屬性

定義

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

多載

名稱 Description
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 物件。

適用於