C# C# Basics Perfect Final

Plamen Petkov
Plamen Petkov
347 Points

Need help with the last C# challenge

using System;

namespace Treehouse.CodeChallenges { class Program { static void Main() { Console.Write("Enter the number of times to print \"Yay!\": "); var input = Console.ReadLine();

        var count = int.Parse(input);
        try
        {
            int i = 0;
            while(i < count)
            {
                i += 1;   
                Console.WriteLine("Yay!");
            }
        }
        catch (FormatException)
        {
            Console.WriteLine("You must enter a whole number.");
            continue;
    }
}

}

It gives me Program.cs(26,246): error CS1525: Unexpected symbol `end-of-file', any idea why?

2 Answers

You seem to be missing some closing braces }

Plamen Petkov
Plamen Petkov
347 Points

I thought so too, but all brackets were in place. I'll check it again, thanks :)