C# 属性参数的 PascalCase 或 camelCase?

PascalCase or camelCase for C# attribute parameters?

this Microsoft documentation, they use camelCase for the author and version parameters. But the predefined attributes uses PascalCase, see for example this page为三个参数。最常用的编码约定是什么?

要么文档将文本格式化为句子大写,要么考虑初始化的属性名称...

The three properties of AttributeUsageAttribute are set by defining the following parameters:

ValidOn

结果与您在文档中阅读的结果相同,并且您在此处拥有参数的真实语法:

https://docs.microsoft.com/dotnet/api/system.attributeusageattribute.-ctor

哪里有:

public AttributeUsageAttribute (AttributeTargets validOn);

您应该尽可能使用官方通用编码标准。

有时您会发现不符合要求的代码,即使在 MS 网站上也是如此。