Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

IMemoryCache.TryGetValue(Object, Object) Method

Definition

Namespace:
Microsoft.Extensions.Caching.Memory
Assembly:
Microsoft.Extensions.Caching.Abstractions.dll
Package:
Microsoft.Extensions.Caching.Abstractions v11.0.0-preview.5.26302.115
Source:
IMemoryCache.cs
Source:
IMemoryCache.cs
Source:
IMemoryCache.cs
Source:
IMemoryCache.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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);
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

The located value or null.

Returns

True if the key was found.

Applies to


Feedback

Was this page helpful?