ICollectionKeyValueStorage.TryGetValue<T>(String, String, T) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从存储中获取当前值,并指示是否在存储中找到了密钥。
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
返回
如果存储中的值为 true,则默认 (T) (如果不在存储中)