在解决方案上运行代码分析 ([Roslyn] Microsoft.CodeAnalysis.FxCopAnalyzers) 时,出现以下警告:
Warning CA1716
Rename namespace CompanyA.Product.Shared.LibraryA so that it no longer conflicts
with the reserved language keyword 'Shared'.
Using a reserved keyword as the name of a namespace makes it harder for consumers
in other languages to use the namespace.
在哪里可以找到C#中命名空间的保留关键字的完整列表?
答案 0 :(得分:4)
整个列表太长,无法在此处重复,在以下变量中用IdentifiersShouldNotMatchKeywords.cs
进行了硬编码:
它包含来自C#,VB.NET和C ++的保留关键字。
答案 1 :(得分:0)
这是VB.Net项目吗?由于Shared
是一个
VB.Net reserved keyword