.NET valid property names

*爱你&永不变心* 提交于 2019-12-20 03:23:19

问题


Where is the documentation for valid property names in .NET? Obviously things like space, * or & aren't valid in a property name, but where is this documented?


回答1:


http://msdn.microsoft.com/en-us/library/aa664670(VS.71).aspx

From the language spec. Property names are identifiers just like members and functions. Granted, there are standard naming conventions elsewhere that are optional, but greatly encouraged.




回答2:


You can look the information up for a particular language on the platform, here are a few.

C# Language
VB Language

More specifically: C# Property Declaration




回答3:


The rules for valid identifiers apply to the properties as well.

Start looking here: C# Language Specification - 2.4.2 Identifiers




回答4:


http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf for the C#



来源:https://stackoverflow.com/questions/1494106/net-valid-property-names

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!