Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Error CS0655

'parameter' is not a valid named attribute argument because it is not a valid attribute parameter type.

See the Attributes Tutorial for a discussion of valid parameter types for an attribute.

The following sample generates 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()
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.