运行代码分析时 ([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# 中命名空间的保留关键字的完整列表?
最佳答案
整个列表太长,无法在此重复,已硬编码在 IdentifiersShouldNotMatchKeywords.cs
中,在以下变量中:
它包含 C#、VB.NET 和 C++ 的保留关键字。
关于c# - 是否有命名空间的所有保留关键字的列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59085307/