c# - How do i simplify 2 foreach using LINQ? -


how can in more readable way?

 foreach (var actual in actualpositions)  {      foreach (var projection in projections)      {          var position        = create(book, actual, projection);          position.targetnett = projection.dailyprojectednet.tostring();          yield return position;      }  } 

you want simplify that? why? it's simple , readable , understandable. can come sorts of gobbledygook harder read sure looks cooler. not! resist urge fancy.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -