我可以在字段中添加点,但我无法删除它们。这是我目前使用的代码:
public class Vertex
{
public Point p { get; private set; }
public int ident {get; private set; }
public int dist { get; set; }
public Vertex(Point p, int ident)
{
this.p = p;
this.ident = ident;
}
}
答案 0 :(得分:0)
您可以使用:
this.p = Point.Empty;
this.indent = 0;
因此请调用您的方法Vertex:
Vertex(Point.Empty, 0);
答案 1 :(得分:-1)
您可以为p
public class Vertex
{
public Point p { get; private set; }
public int ident {get; private set; }
public int dist { get; set; }
public Vertex(Point p, int ident)
{
this.p = p;
this.ident = ident;
}
public void Reset() { p = new Point(); }
}