Values & References3 / 14
Up next

Struct is a value type

// a struct is a value type: assignment makes a copy
var a = new Point { X = 1 };
var b = a;
b.X = 99;
Console.WriteLine(a.X);

struct Point { public int X; }
What you're solving

assignment copies the whole value