C#C
C#3y ago
Valwex

❔ Initializing an object

Hello, what is the difference between these two lines?
var p = new Point() { X = 42, Y = 13 };

and

var p = new Point(42, 13);


I know that the first allows you to initiate an object, but I don't understand the difference
Was this page helpful?