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 Initialization

Luis Santos
Luis Santos
3,566 Points

I am trying to pass the value, I am stuck again. C#

What exactly am I doing wrong, I set up the constructor and attempted to pass the value as instructed. I am getting an error message at every turn. Can somebody please HELP!!!

Frog.cs
namespace Treehouse.CodeChallenges
{
    class Frog
    {
        public readonly int TongueLength;

      public Frog( int ToungeLength){

        ToungeLength = ToungeLength;

      }
    }
}

2 Answers

Arturs Dubra
Arturs Dubra
4,748 Points

In your code you have 3 places where TongueLenght is spelled wrong and that is the main reason why you can't pass this challenge.

First one is in the line public Frog(int tongueLength) (you have ToungeLength!)

Second two errors are in the following line

TongueLenght = tongueLenght; (you have ToungeLength = ToungeLength)

I had trouble with this challenge too since I kept spelling length as lenght :)

I hope this helps

Steven Parker
Steven Parker
231,198 Points

It looks like you have some spelling and capitalization errors. Check your spelling of "tongue" (not "tounge") and use a lower-case "t" for the passed parameter, to distinguish it from internal one.

Luis Santos
Luis Santos
3,566 Points

It's still not working out for me, Steven. Do you have anymore suggestions?