語言

OutputCacheProfileCollection.Item[] 屬性

定義

獲得指定的 OutputCacheProfile 收藏品。

多載

名稱 Description
Item[Int32]

取得或設定 OutputCacheProfile 物件在指定的索引位置。

Item[String]

得到指定名稱的 。OutputCacheProfile

Item[Int32]

取得或設定 OutputCacheProfile 物件在指定的索引位置。

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 集合索引。

屬性值

在指定的索引上。OutputCacheProfile

範例

以下程式碼範例說明如何使用該 Item[] 屬性。


// 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]

得到指定名稱的 。OutputCacheProfile

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 。

屬性值

這些 OutputCacheProfile 名稱就是指定的。

範例

以下程式碼範例說明如何使用該 Item[] 屬性。

// 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")

另請參閱

適用於