ImmutableDictionary<TKey,TValue>.Builder.TryGetKey(TKey, TKey) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines whether this dictionary contains a specified key.
public:
bool TryGetKey(TKey equalKey, [Runtime::InteropServices::Out] TKey % actualKey);
public bool TryGetKey (TKey equalKey, out TKey actualKey);
member this.TryGetKey : 'Key * 'Key -> bool
Public Function TryGetKey (equalKey As TKey, ByRef actualKey As TKey) As Boolean
- equalKey
- TKey
The key to search for.
- actualKey
- TKey
The matching key located in the dictionary if found, or equalkey
if no match is found.
true
if a match for equalKey
is found; otherwise, false
.
Following are some scenarios where TryGetKey may be useful:
You want to reuse a previously stored object reference instead of creating a new reference.
You want to look up the canonical value of an object
You want to retrieve more complete data about an object
Termék | Verziók |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
UWP | 10.0 |
.NET-visszajelzés
A(z) .NET egy nyílt forráskód projekt. Visszajelzés adásához válasszon egy hivatkozást: