MemoryCache.TryGetValue(Object, Object) 方法

定义

获取与此键关联的项(如果存在)。

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

参数

key
Object

用于标识所请求项的对象。

result
Object

返回

如果找到了该键,则为 true

实现

适用于