Table of Contents

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>
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

key TKey

Returns

bool

true if item is 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

array TKey[]

The one-dimensional Array that is the destination of the elements copied from ICollection<T>. The Array must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

Exceptions

ArgumentNullException

array is null.

ArgumentOutOfRangeException

arrayIndex is less than 0.

ArgumentException

The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.

GetEnumerator()

Returns an enumerator that iterates through the OrderedDict<TKey, TValue>.KeyCollection.

public OrderedDict<TKey, TValue>.KeyCollection.Enumerator GetEnumerator()

Returns

OrderedDict<TKey, TValue>.KeyCollection.Enumerator

A OrderedDict<TKey, TValue>.KeyCollection.Enumerator for the OrderedDict<TKey, TValue>.KeyCollection.