Vector<T>.TryGet<K> Method

Attempts to get the value with the specified key.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
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

Boolean
The value with key key.

Exceptions

InvalidOperationException

The vector does not have an index.

InvalidCastException

The element type of the vector's index is not K.

KeyNotFoundException

key was not found in the vector's index.

See Also