コード例 #1
0
        public void AddPrime(long number)
        {
            if (number <= 1)
            {
                throw new ArgumentOutOfRangeException(nameof(number), $"The number {number} is not a valid prime number.");
            }

            PrimeNumbers.Add(number);
        }