Upgrade to Pro — share decks privately, control downloads, hide ads and more …

LINQ、Select連弾ってやります?

 LINQ、Select連弾ってやります?

2015/04/11のJXUG第4回で発表した資料です

RyotaMurohoshi

April 11, 2015
Tweet

More Decks by RyotaMurohoshi

Other Decks in Technology

Transcript

  1. ಡΈͣΒ͘ͳ͍Ͱ͔͢ʁ List<A> aList = LoadList (); IEnumerable<D> dList = aList

    .Select (a => CovetCtoD( CovetBtoC( ConvertAtoB( a ) ) ) );
  2. ๻͸ͬͪ͜ͷํ͕޷͖Ͱ͢ɻ࿈஄ʂ List<A> aList = LoadList (); IEnumerable<D> dList = aList

    .Select (a => CovetAtoB(a)) .Select (b => CovetBtoC(b)) .Select (c => CovetCtoD(c));
  3. ͜͏΋ॻ͚·͢Ͷɺ࿈஄ʂ List<A> aList = LoadList (); IEnumerable<D> dList = aList

    .Select (CovetAtoB) .Select (CovetBtoC) .Select (CovetCtoD);