Vector<T>.Try Get<K> Method
Attempts to get the value with the specified key.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
The value with key key.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
public bool TryGet<K>(
K key,
out T value
)
Parameters
- key K
- The key to look up.
- value T
- On return, the retrieved value.
Type Parameters
- K
- The element type of the vector's index.
Return Value
BooleanThe value with key key.
Exceptions
Invalid | The vector does not have an index. |
Invalid | The element type of the vector's index is not K. |
Key | key was not found in the vector's index. |