public static multiply operator *(multiply obj1, multiply obj2) { multiply ml = new multiply(); ml.x = obj1.x * obj2.x; ml.y = obj1.y * obj2.y; return(ml); }
static void Main(string[] args) { multiply c1 = new multiply(2, 3); multiply c2 = new multiply(5, 4); multiply result = c1 * c2; Console.WriteLine(result); Console.ReadKey(); }