private static void OperatorPersonalizadoComparativoMenor() { var poligonoA = new Poligono(1, 3, 2, 1); var poligonoB = new Poligono(3, 3, 1, 1); Console.WriteLine($"{poligonoA < poligonoB}"); }
private static void OperatorPersonalizadoComparativoMaiorIgual() { var poligonoA = new Poligono(1, 2, 2, 1); var poligonoB = new Poligono(2, 2, 1, 1); Console.WriteLine($"{poligonoA >= poligonoB}"); }
private static void OperatorPersonalizadoEqualidade() { var poligonoA = new Poligono(4, 3, 3, 6); var poligonoB = new Poligono(2, 2, 6, 6); Console.WriteLine($"{poligonoA == poligonoB}"); }
private static void OperatorPersonalizadoInequalidade() { var poligonoA = new Poligono(1, 3, 5, 2); var poligonoB = new Poligono(3, 2, 6, 1); Console.WriteLine($"{poligonoA != poligonoB}"); }
private static void OperatorPersonalizadoDivisaoComposta() { var poligonoA = new Poligono(10, 8, 10, 6); var poligonoB = new Poligono(5, 2, 10, 3); poligonoA /= poligonoB; }
private static void OperatorPersonalizadoSubtracao() { var poligonoA = new Poligono(10, 8, 10, 6); var poligonoB = new Poligono(5, 2, 10, 3); var poligonoC = poligonoA - poligonoB; }
private static void OperatorPersonalizadoDivisor() { var poligonoA = new Poligono(10, 8, 10, 6); var poligonoB = new Poligono(5, 2, 10, 3); var poligonoC = poligonoA / poligonoB; }
private static void OperatorPersonalizadoMultiplicador() { var poligonoA = new Poligono(2, 2, 2, 2); var poligonoB = new Poligono(3, 3, 3, 3); var poligonoC = poligonoA * poligonoB; }
private static void OperatorPersonalizadoConversaoImplicita() { var quadrado = new Retangulo() { LadoA = 3, LadoB = 4 }; Poligono poligono = quadrado; }
private static void OperatorPersonalizadoDecremento() { var poligono = new Poligono(2, 2, 2, 2); poligono--; }