// compile with: /unsafe
struct Point
{
public int x, y;
}
class MainClass12
{
unsafe static void Main()
{
Point pt = new Point();
Point* pp = &pt;
pp->x = 123;
pp->y = 456;
Console.WriteLine("{0} {1}", pt.x, pt.y);
}
}
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok