class Triangle { public int koxm1; public int koxm2; public int koxm3; public Triangle(int a, int b, int c) { this.koxm1 = a; this.koxm2 = b; this.koxm3 = c; } static public bool operator>(Erankyun a, Erankyun b) { return a.koxm1 + a.koxm2 + a.koxm3 > b.koxm1 + b.koxm2 + b.koxm3; } }
static void Main(string[] args) { Erankyun e1 = new Erankyun(1,2,3); Erankyun e2 = new Erankyun(1,4,3); Console.WriteLine(e1 > e2); // false }
1 + 2 + 3 < 1 + 4 + 3
e1 > e2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)