C# C# Objects Object-Oriented Programming Instantiation

Chukwunonso Emmanuel
PRO
Chukwunonso Emmanuel
Pro Student 3,046 Points

Create a Frog instance in Program.Main() and assign it to a variable named mike

Create a Frog instance in Program.Main() and assign it to a variable named mike

Program.cs
namespace Treehouse.CodeChallenges
{
    class Program
    {

        static void Main()
        {            

            var mike = new Frog;

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

}
}

1 Answer

Steven Parker
Steven Parker
173,506 Points

You're close, but when you create a new instance of a class, you must put parentheses after the class name even if the class constructor does not require any arguments.