public static minus operator -(minus obj1, minus obj2) { minus dif = new minus(); dif.x = obj1.x - obj2.x; dif.y = obj1.y - obj2.y; return(dif); }
static void Main(string[] args) { minus c1 = new minus(5, 9); minus c2 = new minus(1, 3); minus result = c1 - c2; Console.WriteLine(result); Console.ReadKey(); }