using System;
public ref struct StackOnlyPointStruct
{
public StackOnlyPointStruct(int x, int y)
this.X = x;
this.Y = y;
}
public int X
get;
set;
public int Y
public void Print()
Console.WriteLine($"Point (struct) found at X={X}, Y={Y}");
public class Program
public static void Main()
StackOnlyPointStruct p = new StackOnlyPointStruct(100, 200);
p.Print();
// this would fails now!
// object pAsObjs = p;