Example #1
0
    static void Main()
    {
        Primes ob = new Primes();

        for (int i = 0; i < 5; i++)
        {
            Console.WriteLine("Next value is " + ob.GetNext());
        }

        Console.WriteLine("\nResetting");
        ob.Reset();

        for (int i = 0; i < 5; i++)
        {
            Console.WriteLine("Next value is " + ob.GetNext());
        }

        Console.WriteLine("\nStarting at 100");
        ob.SetStart(100);

        for (int i = 0; i < 5; i++)
        {
            Console.WriteLine("Next value is " + ob.GetNext());
        }
    }