ICollectionKeyValueStorage.TryGetValue<T>(String, String, T) 方法

定义

从存储中获取当前值,并指示是否在存储中找到了密钥。

public:
generic <typename T>
 bool TryGetValue(System::String ^ collectionPath, System::String ^ key, [Runtime::InteropServices::Out] T % value);
public bool TryGetValue<T> (string collectionPath, string key, out T value);
abstract member TryGetValue : string * string * 'T -> bool
Public Function TryGetValue(Of T) (collectionPath As String, key As String, ByRef value As T) As Boolean

类型参数

T

参数

collectionPath
String
key
String
value
T

返回

Boolean

如果存储中的值为 true,则默认 (T) (如果不在存储中)

适用于