private static void EnsureNumberPositive(int n, string name) { if (n <= 0) throw new ArgumentException($"{name} has to be positive"); }