Я хочу поменять местами поле в классе ConvexHull точно так же, как swap (points [0], points [1]).
Как мне это сделать?
public class ConvexHull
{
List<Point> points;
public void run ()
{
Point.swap ( ref points[ 0 ], ref points[ 1 ] ); //Error!!
}
}
public class Point
{
private double x, y;
Point () { x = y = 0; }
public static void swap(ref Point a, ref Point b) {
Point c = a;
a = b;
b = c;
}
}
x
иy
Point
. Я имею ввиду, что заPoint
? - person Rufus L   schedule 16.04.2015argument is not classified as a variable
. - person hatchet - done with SOverflow   schedule 16.04.2015