Opportunities to use Func<> to improve code readability

前端 未结 6 1063
野趣味
野趣味 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条回答
  •  春和景丽
    2021-01-19 09:16

    It's only really more readable/useful when/if you are reusing it.

    A more interesting Lambda to pass around and futz with, would be Expression> as you can still invoke it when you want too, but you can also pull it completely apart and tinker with it.

    Its...well...dead sexy.

提交回复
热议问题