Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Objects Object-Oriented Programming Instantiation

ultan gannon
ultan gannon
5,876 Points

Don't know how to make the Frog class

?

Program.cs
namespace Treehouse.CodeChallenges
{
    class Program
    {
        static void Main()
        {            

        }
    }
}
Frog.cs
namespace Treehouse.CodeChallenges
    class Frog
{

}

3 Answers

Steven Parker
Steven Parker
231,269 Points

Your class needs to go inside the braces that belong to the namespace.

And your class will need a set of braces of its own. Take a look at how class Program is defined in Program.cs for an example (just disregard the method it has).

I'll bet you can get it now without an explicit spoiler.

You're close. You just need to move the class inside the namespace braces and provide braces for the class as well. Using the other script as a template you can copy/paste the code and change what's needed into this:

namespace Treehouse.CodeChallenges
{
    class Frog
    {
    }
}