public static Vidrizok operator -(Vidrizok obj1, Vidrizok obj2) { Vidrizok result = new Vidrizok(); result.start = obj1.start - obj2.start; result.end = obj1.end - obj2.end; result.Getdlina(); return(result); }
static void Main(string[] args) { Tochka start1 = new Tochka(); Tochka end1 = new Tochka(3, 9); Tochka start2 = new Tochka(end1); Vidrizok W1 = new Vidrizok(start1, end1); Vidrizok W2 = new Vidrizok(start2, 8, 5); Vidrizok W3 = new Vidrizok(W2); W3.Sdvig(3, 0); W3 = W1 + W2; }
public Vidrizok(Vidrizok obj) : this(obj.start, obj.end) { }