} // end of - Promt(string a) // функциональный аналог текстбокса с лебелом - out double dbl static public void Promt(string a, out dim1 dim) { string str; double d; bool result; if (divide_true == ' ') { divider(); } Console.Write(a); do { str = Console.ReadLine(); // читать строку ! str = str.Replace(divide_false, divide_true); result = Double.TryParse(str, out d); if (!result) { Console.WriteLine("Input Error! Try Again!"); str = ""; d = 0.0; } } while (!result); dim = new dim1(d); } // end of - Promt(string a)
} // end of - AreaCircle() public static dim2 AreaRing(dim1 d_ex, dim1 d_in) { // return(Math.Pow(d_ex, 2) * PiDiv4 - Math.Pow(d_in, 2) * PiDiv4); } // end of - AreaCircle()
} // end of - AreaRectangle() public static dim2 AreaRectangle(dim1 b_ex, dim1 h_ex) { return(b_ex * h_ex); } // end of - AreaRectangle()
} // end of - AreaCircle() public static dim2 AreaCircle(dim1 d_ex) { // return(Math.Pow(d_ex, 2) * PiDiv4); } // end of - AreaCircle()