diff --git a/algorithms/CSharp/src/Number-Theory/sieve-of-eratosthenes.cs b/algorithms/CSharp/src/Number-Theory/sieve-of-eratosthenes.cs index 9c4877fc..006b10e3 100644 --- a/algorithms/CSharp/src/Number-Theory/sieve-of-eratosthenes.cs +++ b/algorithms/CSharp/src/Number-Theory/sieve-of-eratosthenes.cs @@ -7,7 +7,7 @@ namespace Algorithms.NumberTheory public class SieveOfEratosthenes { // returns all the prime numbers from 1 to max - public static List PrimeGenerator(int max) + public static List GeneratePrimeNumbers(int max) { List isPrime = Enumerable.Repeat(true, max + 1).ToList(); @@ -39,7 +39,7 @@ namespace Algorithms.NumberTheory public static void Main() { - List primeNumbers = PrimeGenerator(100); + List primeNumbers = GeneratePrimeNumbers(100); Console.WriteLine(string.Join(", ", primeNumbers)); } } diff --git a/algorithms/CSharp/test/Number-Theory/sieve-of-eratosthenes.cs b/algorithms/CSharp/test/Number-Theory/sieve-of-eratosthenes.cs index 6775e094..1300fb70 100644 --- a/algorithms/CSharp/test/Number-Theory/sieve-of-eratosthenes.cs +++ b/algorithms/CSharp/test/Number-Theory/sieve-of-eratosthenes.cs @@ -9,7 +9,7 @@ namespace Algorithms.Tests.NumberTheory [TestCase(100, "2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97")] public void SieveOfEratosthenes_ShouldReturnExpected(int max, string expected) { - List primeNumbers = Algorithms.NumberTheory.SieveOfEratosthenes.PrimeGenerator(max); + List primeNumbers = Algorithms.NumberTheory.SieveOfEratosthenes.GeneratePrimeNumbers(max); Assert.AreEqual(expected, string.Join(", ", primeNumbers)); } }