blob: 94d6f8f26ae1adea469b6c89a67ef4cf07926aa5 (
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 unfixed expression inside of 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;
}
}
|