summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0212-3.cs
blob: 1e86d313b6d73ae45b596929c9f8a71e1c42d527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// CS0212: You can only take the address of unfixed expression inside of a fixed statement initializer
// Line: 10
// Compiler options: -unsafe

struct Foo {
	public float f;
	public void foo ()
	{
		unsafe {
			float *pf1 = &f;
		}
	}
}

class Test {
	static void Main ()
	{
		Foo x = new Foo ();
		x.foo ();
	}
}