IMemoryCache.TryGetValue(Object, Object) Method

Definition

Gets the item associated with this key if present.

C#
public bool TryGetValue(object key, out object? value);

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

Producto Versiones
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)