Given
IList indexes; ICollection collection;
What is the most elegant way to extract all T in
You could do it in an extension method:
static IEnumerable Extract(this ICollection collection, IList indexes) { int index = 0; foreach(var item in collection) { if (indexes.Contains(index)) yield item; index++; } }