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

cs0192.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 17ecc59fa295e46e69462a4d3ed4461ecf459f16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// cs0192.cs: You cannot pass a readonly field by ref or out (except in a constructor)
// Line: 17

using System;

class A
{
	public readonly int a=5;
	
	public void Inc (ref int a)
	{
		++a;
	}
	
	public void IncCall ()
	{
		Inc (ref a);
	}
	
	static void Main ()
	{
		Console.WriteLine ("Test cs0192.cs");
	}
}