ConcurrentDictionary<TKey,TValue>.TryGetAlternateLookup<TAlternateKey> 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个类型的实例,该实例可用于对用作ConcurrentDictionary<TKey,TValue>键而不是键TAlternateKey执行操作TKey。
public:
generic <typename TAlternateKey>
bool TryGetAlternateLookup([Runtime::InteropServices::Out] System::Collections::Concurrent::ConcurrentDictionary<TKey, TValue>::AlternateLookup<TAlternateKey> % lookup);
public bool TryGetAlternateLookup<TAlternateKey>(out System.Collections.Concurrent.ConcurrentDictionary<TKey,TValue>.AlternateLookup<TAlternateKey> lookup) where TAlternateKey : allows ref struct;
member this.TryGetAlternateLookup : AlternateLookup -> bool
Public Function TryGetAlternateLookup(Of TAlternateKey) (ByRef lookup As ConcurrentDictionary(Of TKey, TValue).AlternateLookup(Of TAlternateKey)) As Boolean
类型参数
- TAlternateKey
用于执行查找的键的备用类型。
参数
方法返回 true时创建的查找实例,或该方法返回 false时不应使用的默认实例。
返回
true 如果可以创建查找,则为 ;否则,为 false.
注解
此实例必须使用与 false。