Cache.Get(String) 方法

定義

Cache 擷取指定的項目。Retrieves the specified item from the Cache object.

public:
 System::Object ^ Get(System::String ^ key);
public object Get (string key);
member this.Get : string -> obj
Public Function Get (key As String) As Object

參數

key
String

要擷取的快取項目識別項。The identifier for the cache item to retrieve.

傳回

擷取的快取項目,或如果沒有找到索引鍵時,則為 nullThe retrieved cache item, or null if the key is not found.

範例

下列範例示範如何取得針對 ASP.NET 文字方塊伺服器控制項快取的值。The following example demonstrates how to retrieve the value cached for an ASP.NET text box server control.

Cache.Get("MyTextBox.Value");
   
Cache.Get("MyTextBox.Value")

適用於

另請參閱