More fluent C# / .NET

后端 未结 21 1384
名媛妹妹
名媛妹妹 2020-12-23 22:51

A co-worker of mine came up with this and I wonder what others think? Personally, I find it interesting but wonder if it is too big a departure? Code examples below. Extensi

21条回答
  •  难免孤独
    2020-12-23 23:46

    Good rule of thumb:

    If your first impression of your code is "This is clever" - it's probably not a good idea.

    Good code should be simple, readable, and only "clever" if absolutely necessary.

提交回复
热议问题