更新时间:2021-12-16 05:57:28
这可能已在 .NET Core 3 中修复,但在此之前,可以使用以下解决方法:
This has presumably been fixed in .NET Core 3, but until then, the following workarounds are available:
[SuppressMessage("", "IDE0032", Justification = "https://github.com/dotnet/core/issues/2981")]
for这个目的.System.Runtime.CompilerServices.IsReadOnlyAttribute
.[SuppressMessage("", "IDE0032", Justification = "https://github.com/dotnet/core/issues/2981")]
for this purpose.System.Runtime.CompilerServices.IsReadOnlyAttribute
in the same assembly or some common assembly.