Share via


OutputCacheProfileCollection.Get 方法

定義

取得指定的 OutputCacheProfileCollection 項目。

多載

Get(Int32)

取得指定索引處的 OutputCacheProfile 項目。

Get(String)

取得具有指定名稱的 OutputCacheProfile 項目。

Get(Int32)

取得指定索引處的 OutputCacheProfile 項目。

public:
 System::Web::Configuration::OutputCacheProfile ^ Get(int index);
public System.Web.Configuration.OutputCacheProfile Get (int index);
member this.Get : int -> System.Web.Configuration.OutputCacheProfile
Public Function Get (index As Integer) As OutputCacheProfile

參數

index
Int32

OutputCacheProfileCollection 項目的索引。

傳回

在指定索引的 OutputCacheProfile 項目。

範例

下列程式碼範例示範如何使用 Get 方法。

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

另請參閱

適用於

Get(String)

取得具有指定名稱的 OutputCacheProfile 項目。

public:
 System::Web::Configuration::OutputCacheProfile ^ Get(System::String ^ name);
public System.Web.Configuration.OutputCacheProfile Get (string name);
member this.Get : string -> System.Web.Configuration.OutputCacheProfile
Public Function Get (name As String) As OutputCacheProfile

參數

name
String

OutputCacheProfileCollection 項目的名稱。

傳回

具有指定名稱的 OutputCacheProfile 項目。

範例

下列程式碼範例示範如何使用 Get 方法。

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

另請參閱

適用於