Any reason to write the “private” keyword in C#?

后端 未结 9 579
梦谈多话
梦谈多话 2020-12-04 18:54

As far as I know, private is the default everywhere in C# (meaning that if I don\'t write public, protected, internal

9条回答
  •  天命终不由人
    2020-12-04 19:19

    Readability - Not everyone may know that private is the default behaviour.

    Intent - Gives a clear indication that you have specifically declared the property private (for whatever reason).

提交回复
热议问题