String Benchmarks in C# - Refactoring for Speed/Maintainability

后端 未结 10 1428
无人及你
无人及你 2021-02-09 21:29

I\'ve been tinkering with small functions on my own time, trying to find ways to refactor them (I recently read Martin Fowler\'s book Refactoring: Improving the Design of Ex

10条回答
  •  深忆病人
    2021-02-09 21:55

    My first refactoring would be to change the name of the method to something more descriptive. MakeNiceString imo is not a name that would indicate to me what this method does.

    How about PascalCaseToSentence? Not loving that name, but it's better than MakeNiceString.

提交回复
热议问题