private static void RandomizeShape(Shape shape) { if(shape.GetType() == typeof(Triangle)) { ((Triangle)shape).Base = (double)_random.Next(1, 40); ((Triangle)shape).Height = (double)_random.Next(1, 40); } else if (shape.GetType() == typeof(Circle)) { ((Circle)shape).Radius = (double)_random.Next(1, 40); } else if(shape.GetType() == typeof(Rectangle)) { ((Rectangle)shape).Width = (double)_random.Next(1, 40); ((Rectangle)shape).Height = (double)_random.Next(1, 40); } }