Depending on your style and .net version you can change some of your methods to Expression bodied function members:
/// documentation
static double ObvodTrojuhelniku(double a, double b, double c) => a + b + c
/// documentation
static double ObvodSestiuhelniku(double d) => 6 * d
/// documentation
static double ObsahSestiuhelniku(double d) => ((3 * Math.Sqrt(3) * Math.Pow(d, 2))) / 2;
I really like those small function you are using, they are easily testable and follow SRP - they have only one function and one reasons to change - if at all.
You should add input validation - if a user inputs "QWER"
and you int.Parse(..)
it directly, it will crash. Similarly for double.Parse(...)
where you do int VolbaObrazce = int.Parse(Console.ReadLine());
and inside static double PrectiPromennou(string text)
.
Depending on your style and .net version you can change some of your methods to Expression bodied function members:
/// documentation
static double ObvodTrojuhelniku(double a, double b, double c) => a + b + c
/// documentation
static double ObvodSestiuhelniku(double d) => 6 * d
/// documentation
static double ObsahSestiuhelniku(double d) => ((3 * Math.Sqrt(3) * Math.Pow(d, 2))) / 2;