语言

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 对象。

适用于