New test.
[mono.git] / mcs / errors / cs0617.cs
1 // cs0617.cs: `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 : 20
3
4 using System;
5
6 [AttributeUsage (AttributeTargets.Class, AllowMultiple = true)]
7         public class SimpleAttribute : Attribute {
8
9                 string name = null;
10
11                 public readonly string MyNamedArg;
12                 
13                 public SimpleAttribute (string name)
14                 {
15                         this.name = name;
16                 }
17
18         }
19
20 [Simple ("Dummy", MyNamedArg = "Dude!")]
21         public class Blah {
22
23                 public static void Main ()
24                 {
25                 }
26         }