PointF[] Points = new PointF[50]; Bezier[] Bez = new Bezier[10]; int number = 0; private void Add_Curve(object sender, EventArgs e) { Bez[number] = new Bezier(Points, stepen); } private void Add_Point(object sender, MouseEventArgs e) { Points[koltochek - 1] = e.Location; } 
  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

Arrays are passed by reference.

You need to make a copy of the array. Then changing the values ​​in the copy will not affect the original.

 Bez[number] = new Bezier(Points.ToArray(), stepen); 

This implies that PointF is a structure (significant type).

  • Thank you very much! Now working - Gymon