summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0192.cs
blob: c774495ab094ea0cef011f06e9e6fcdecdeff9df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// CS0192: A readonly field `A.a' cannot be passed 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 ()
	{
	}
}