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
Post a Comment