更新:2007 年 11 月
错误消息
“parameter”不是有效的命名属性参数,因为它不是有效的属性参数类型有关属性的有效参数类型的讨论,请参见
示例
下面的示例生成 CS0655:
// CS0655.cs
using System;
class MyAttribute : Attribute
{
    // decimal is not valid attribute parameter type
    public decimal d = 0;
    public int e = 0;
}
[My(d = 0)]   // CS0655
// Try the following line instead:
// [My(e = 0)]
class C
{
    public static void Main()
    {
    }
} | |