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

cs0212.cs « errors « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 132d74d5c62dbe3ae9235d29940a1c242d69cf2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// cs0212: You can only take the address of an unfixed expression inside a fixed statement initializer.
// Line: 19
// Compiler options: -unsafe

using System;

class X
{
	public int x;
	public X ()
	{
		this.x = 4;
	}

	public unsafe static void Main ()
	{
		X x = new X ();
		int *p = &x.x;
	}
}