Class OrderedDict<TKey, TValue>.KeyCollection
- Namespace
- OptunaSharp.Collections
- Assembly
- OptunaSharp.dll
Represents the collection of keys in a OrderedDict<TKey, TValue>.
public sealed class OrderedDict<TKey, TValue>.KeyCollection : IList<TKey>, ICollection<TKey>, IReadOnlyList<TKey>, IReadOnlyCollection<TKey>, IEnumerable<TKey>, IList, ICollection, IEnumerable
- Inheritance
-
OrderedDict<TKey, TValue>.KeyCollection
- Implements
-
IList<TKey>ICollection<TKey>IReadOnlyList<TKey>IReadOnlyCollection<TKey>IEnumerable<TKey>
- Inherited Members
Properties
Count
Gets the number of elements contained in the ICollection<T>.
public int Count { get; }
Property Value
- int
The number of elements contained in the ICollection<T>.
Methods
Contains(TKey)
Determines whether the ICollection<T> contains a specific value.
public bool Contains(TKey key)
Parameters
keyTKey
Returns
- bool
true if
itemis found in the ICollection<T>; otherwise, false.
CopyTo(TKey[], int)
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
public void CopyTo(TKey[] array, int arrayIndex)
Parameters
arrayTKey[]The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.
arrayIndexintThe zero-based index in
arrayat which copying begins.
Exceptions
- ArgumentNullException
arrayis null.- ArgumentOutOfRangeException
arrayIndexis less than 0.- ArgumentException
The number of elements in the source ICollection<T> is greater than the available space from
arrayIndexto the end of the destinationarray.
GetEnumerator()
Returns an enumerator that iterates through the OrderedDict<TKey, TValue>.KeyCollection.
public OrderedDict<TKey, TValue>.KeyCollection.Enumerator GetEnumerator()