How to get an element from Dictionary without knowing the key
-
There's a dictionary like
Dictionary(Of Integer, ObjectPool)
♪- Cycle free
foreach
Get the object out of him without knowing the key? - Can we get the first or last object in the vocabulary without dialing the elements?
- Cycle free
-
Dictionary<TKey,TValue>
InterfacesIEnumerable<T>
It is therefore possible to use Linq methods: https://msdn.microsoft.com/en-us/library/bb535050(v=vs.100).aspx ♪ https://msdn.microsoft.com/ru-ru/library/bb549138(v=vs.110).aspx And so on.For example:
Dim first As ObjectPool = dict.FirstOrDefault().Value Dim last As ObjectPool = dict.LastOrDefault().Value
But since the interface doesn't work.
IList<T>
- No index.