OutputCacheProfileCollection.Get 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得指定的 OutputCacheProfileCollection 元素。
多載
| 名稱 | Description |
|---|---|
| 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")