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

What am I forgetting, can someone help me

Not sure how to convert frog to mike

Program.cs
namespace Treehouse.CodeChallenges
{
    class Program
    {
        static void Main()
        {          
                Frog frog = new Frog();

         var mike = Frog() ;
        }
    }
}
Frog.cs
namespace Treehouse.CodeChallenges
{
    class Frog
    {
var mike = new Frog();
    }
}

1 Answer

Jon Wood
Jon Wood
9,884 Points

You pretty much have it!

In Frog.cs remove the instantiation of the class (the challenge just wants it empty).

In Program.cs, you are instantiating an instance of the Frog class in the first line. The challenge wants you to name the variable mike similar to what you have in the second line. Then just remove that second line and you should be good to go!

Let me know if you need any more help.

Thanks for the help Jon!! I just had to put new in front of Frog when I was assigning it to var mike