Cannot use String.Empty as a default value for an optional parameter

前端 未结 8 1610
生来不讨喜
生来不讨喜 2020-12-04 14:47

I am reading Effective C# by Bill Wagner. In Item 14 - Minimize Duplicate Initialization Logic, he shows the following example of using the new opt

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 15:27

    I never use string.Empty, I can't see the point of it. Maybe it makes it easier for people that are really new to programming, but I doubt it's useful even for that.

提交回复
热议问题