static void Main(string[] args) { var size = new mySize { x = 100, y = 200 }; int x = getX(ref size); Debug.Assert(x == 100); }
static extern int getX(ref mySize size);