Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cs0199.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e1737d70f1938e21ea5a8979a3057683bc6231fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// cs0199.cs: A static readonly field 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);
        }
}