Opportunities to use Func<> to improve code readability

前端 未结 6 1021
野趣味
野趣味 2021-01-19 08:26

Today I finally \"got\" the Func<> delegate and saw how I could use it to make some of my less readable LINQ queries (hopefully) more readable.

Here\'s a simpl

6条回答
  •  梦毁少年i
    2021-01-19 09:19

    I guess there would only be a point in doing this if you were going to be reusing the Func in question in a number of places (and it involved more than trivial logic). Otherwise using the standard way seems much better and perfectly readable.

提交回复
热议问题