Merge branch 'master' of github.com:mono/mono
[mono.git] / mcs / errors / cs0617.cs
1 // CS0617: `MyNamedArg' is not a valid named attribute argument. Named attribute arguments must be fields which are not readonly, static, const or read-write properties which are public and not static
2 // Line : 19
3
4 using System;
5
6 [AttributeUsage (AttributeTargets.Class, AllowMultiple = true)]
7 public class SimpleAttribute : Attribute
8 {
9         string name;
10
11         public readonly string MyNamedArg;
12
13         public SimpleAttribute (string name)
14         {
15                 this.name = name;
16         }
17 }
18
19 [Simple ("Dummy", MyNamedArg = "Dude!")]
20 public class Blah {
21
22         public static void Main ()
23         {
24         }
25 }