<PackageReference Include="SSH.NET" Version="2025.0.0" />

IOrderedDictionary<TKey, TValue>

public interface IOrderedDictionary<TKey, TValue> : IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>
Represents a collection of key/value pairs that are accessible by the key or index.
int Count { get; }

Gets the number of key/value pairs contained in the IOrderedDictionary<T, U>.

TValue this[TKey key] { get; set; }

Gets or sets the value associated with the specified key.

ICollection<TKey> Keys { get; }

Gets a collection containing the keys in the IOrderedDictionary<T, U>.

ICollection<TValue> Values { get; }

Gets a collection containing the values in the IOrderedDictionary<T, U>.

bool ContainsKey(TKey key)

Determines whether the IOrderedDictionary<T, U> contains the specified key.

bool ContainsValue(TValue value)

Determines whether the IOrderedDictionary<T, U> contains a specific value.

KeyValuePair<TKey, TValue> GetAt(int index)

Gets the key/value pair at the specified index.

int IndexOf(TKey key)

Determines the index of a specific key in the IOrderedDictionary<T, U>.

void Insert(int index, TKey key, TValue value)

Inserts an item into the collection at the specified index.

bool Remove(TKey key, out TValue value)

Removes the value with the specified key from the IOrderedDictionary<T, U> and copies the element to the value parameter.

void RemoveAt(int index)

Removes the key/value pair at the specified index.

void SetAt(int index, TKey key, TValue value)

Sets the key/value pair at the specified index.

void SetAt(int index, TValue value)

Sets the value for the key at the specified index.

void SetPosition(int index, int newIndex)

Moves an existing key/value pair to the specified index in the collection.

void SetPosition(TKey key, int newIndex)

Moves an existing key/value pair to the specified index in the collection.

bool TryAdd(TKey key, TValue value)

Adds the specified key and value to the dictionary if the key doesn't already exist.

bool TryAdd(TKey key, TValue value, out int index)

Adds the specified key and value to the dictionary if the key doesn't already exist.

bool TryGetValue(TKey key, out TValue value)

Gets the value associated with the specified key.

bool TryGetValue(TKey key, out TValue value, out int index)

Gets the value associated with the specified key.