OutputCacheProfileCollection.Item[] 属性

定义

获取指定的 OutputCacheProfile 集合项。Gets the specified OutputCacheProfile collection item.

重载

Item[Int32]

获取或设置位于指定索引处的 OutputCacheProfile 对象。Gets or sets the OutputCacheProfile object at the specified index.

Item[String]

获取具有指定名称的 OutputCacheProfileGets the OutputCacheProfile with the specified name.

Item[Int32]

获取或设置位于指定索引处的 OutputCacheProfile 对象。Gets or sets the OutputCacheProfile object at the specified index.

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

参数

index
Int32

OutputCacheProfile 对象的集合索引The collection index of the OutputCacheProfile object

属性值

OutputCacheProfile

指定索引处的 OutputCacheProfileThe OutputCacheProfile at the specified index.

示例

下面的代码示例说明如何使用 Item[] 属性。The following code example shows how to use the Item[] property.


// Get the profile with the specified index.
System.Web.Configuration.OutputCacheProfile outputCacheProfile2 =
  outputCacheProfiles[0];

' Get the profile with the specified index.
  Dim outputCacheProfile2 _
  As System.Web.Configuration.OutputCacheProfile = _
  outputCacheProfiles(0)

另请参阅

适用于

Item[String]

获取具有指定名称的 OutputCacheProfileGets the OutputCacheProfile with the specified name.

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

参数

name
String

OutputCacheProfile 对象的名称。The name of the OutputCacheProfile object.

属性值

OutputCacheProfile

具有指定名称的 OutputCacheProfileThe OutputCacheProfile with the specified name.

示例

下面的代码示例说明如何使用 Item[] 属性。The following code example shows how to use the Item[] property.

// Get the profile with the specified name.
System.Web.Configuration.OutputCacheProfile outputCacheProfile3 =
  outputCacheProfiles["MyCacheProfile"];

' Get the profile with the specified name.
  Dim outputCacheProfile3 _
  As System.Web.Configuration.OutputCacheProfile = _
  outputCacheProfiles("MyCacheProfile")

另请参阅

适用于