Merge pull request #5675 from mono/glib-debug-symbols
[mono.git] / mcs / errors / cs0199.cs
1 // CS0199: A static readonly field `ClassMain.index' cannot be passed ref or out (except in a static constructor)
2 // Line: 19
3
4 class ClassMain {
5         static readonly int index;
6
7         static ClassMain ()
8         {
9                 GetMaxIndex (ref index);
10         }
11
12         static void GetMaxIndex (ref int value)
13         {
14                 value = 5;
15         }
16
17         public static void Main ()
18         {
19                 GetMaxIndex (ref index);
20         }
21 }
22