Best practice: ordering of public/protected/private within the class definition?

后端 未结 10 1295
遥遥无期
遥遥无期 2020-12-12 14:34

I am starting a new project from the ground up and want it to be clean / have good coding standards. In what order do the seasoned developers on here like to lay things out

10条回答
  •  醉梦人生
    2020-12-12 14:48

    I used to care a lot. Over the last several years using modern IDEs pretty much everything is only 1 or 2 keystrokes away, I've let my standards relax substantially. Now, I start with statics, member variables, then constructors after that I don't worry about it much.

    In C# I do let Resharper organize things automatically.

提交回复
热议问题