
\begin{slide}{Linq: Beispiel}

Linq = language integrated query

\begin{verbatim}
Random random = ... ; int block = ... ;
IEnumerable<Pair<V,G>> store =
    from Pair<V,G> p in this.pool
    group p by p.first into g
    orderby g.Key
    from q in g.Distinct()
               .OrderBy(p => random.Next())
               .Take(block)
    select q;
this.pool = store.Take(this.size).ToList();
\end{verbatim}
  
\end{slide}
