summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0199.cs
blob: b89f2abd51b6a14b5f01d4eef1a3b1c37b9dd752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// CS0199: A static readonly field `ClassMain.index' cannot be passed ref or out (except in a static constructor)
// Line: 19

class ClassMain {
        static readonly int index;

        static ClassMain ()
        {
                GetMaxIndex (ref index);
        }

        static void GetMaxIndex (ref int value)
        {
                value = 5;
        }

        public static void Main ()
        {
                GetMaxIndex (ref index);
        }
}