public static void Main(string[] args) { Triângulo triângulo = new Triângulo(); Catetos cateto = (Catetos)triângulo; cateto.oposto = System.Int32.Parse(args[0]); cateto.adjacente = System.Int32.Parse(args[1]); System.Console.WriteLine(triângulo.hipotenusa); }
private void Inicializa() { ponto = new Ponto(); ponto.x1 = 100; ponto.y1 = 30; linha = new Linha(); linha.x1 = 130; linha.x2 = 130; linha.y1 = 130; linha.y2 = 230; triângulo = new Triângulo(); triângulo.x1 = 200; triângulo.x2 = 230; triângulo.x3 = 215; triângulo.y1 = 200; triângulo.y2 = 200; triângulo.y3 = 115; this.Text = "Meu Formulário"; }