0
Constructores C#
If this structure: public struct Point{ public int x; public int y; public Point(int a, int b){ this.x=a; this.y=b; } } So... is that a Constructor? And is correct use it with (new) for struct type initialization: Point p= new Point(1,5); Can I iniatilizating a struct var more efficiently? Things...
2 Answers
0
Yes thatâs a constructor. It has the same name as the class/struct and it doesnât have a return type. Initialization looks fine.
0
ok, thinks.. I finish my C# trining and struct was at the end... jaja I was jumping...