IMemoryCache.TryGetValue(Object, Object) Method

Definition

Gets the item associated with this key if present.

public:
 bool TryGetValue(System::Object ^ key, [Runtime::InteropServices::Out] System::Object ^ % value);
public bool TryGetValue (object key, out object value);
public bool TryGetValue (object key, out object? value);
abstract member TryGetValue : obj * obj -> bool
Public Function TryGetValue (key As Object, ByRef value As Object) As Boolean

Parameters

key
Object

An object identifying the requested entry.

value
Object

When this method returns, contains the located value or null.

Returns

true if the key was found.

Applies to