更新:2007 年 11 月
错误消息
CLS 遵从性检查不会在“type”上执行,因为它在此程序集的外部不可见。当一个具有
示例
下面的示例生成 CS3019:
// CS3019.cs
// compile with: /W:2
using System;
[assembly: CLSCompliant(true)]
// To fix the error, remove the next line
[CLSCompliant(true)] // CS3019
class C
{
[CLSCompliant(false)] // CS3019
void Foo()
{
}
static void Main()
{
}
} | |