开发者

Case Conventions in wpf using MVVM

Is there a standard for case and naming conventions in wpf/mvvm that differs from C#?

I am accustomed to camelCase with the first character being lower case for private and upper case开发者_开发知识库 for public methods/properties.

In the sample MVVM code I have been examining I have seen a lot of leading _ characters, is this a holdover from another practice or is there a standard I am missing?


IIRC leading _ is used for member variables. But regarding case conventions, just stay consistent and use something you find comfortable.


There are many sources for this, but here's the offical MSDN Design Guidelines for Class Library Developers. As for MVVM specific conventions, just follow C# design guidelines in your ViewModels and you should be good.


Check out the naming convention at msdn and the IDesign C# coding standard.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜