MemoryCache::Get Method (String^, String^)

.NET Framework (current version)
 

Returns an entry from the cache.

Namespace:   System.Runtime.Caching
Assembly:  System.Runtime.Caching (in System.Runtime.Caching.dll)

public:
virtual Object^ Get(
	String^ key,
	String^ regionName = null
) override

Parameters

key
Type: System::String^

A unique identifier for the cache entry to get.

regionName
Type: System::String^

A named region in the cache to which a cache entry was added. Do not pass a value for this parameter. This parameter is null by default, because the MemoryCache class does not implement regions.

Return Value

Type: System::Object^

A reference to the cache entry that is identified by key, if the entry exists; otherwise, null.

Exception Condition
NotSupportedException

regionName is not null.

ArgumentNullException

key is null.

.NET Framework
Available since 4.0
Return to top
Show: