.NET valid property names

前端 未结 4 729
天命终不由人
天命终不由人 2021-01-22 19:03

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?

相关标签:
4条回答
  • 2021-01-22 19:09

    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

    0 讨论(0)
  • 2021-01-22 19:15

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

    Start looking here: C# Language Specification - 2.4.2 Identifiers

    0 讨论(0)
  • 2021-01-22 19:16

    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.

    0 讨论(0)
  • 2021-01-22 19:28

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

    0 讨论(0)
提交回复
热议问题