C# C# Objects Methods Methods

Not understanding what's wrong

Not sure what I am doing wrong

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


        public Frog(int tongueLength)
        {
            TongueLength = tongueLength;
        }
        public bool EatFly (int distanceToFly)
        {
            return TongueLength >= distanceToFly;
        }

    }

1 Answer

Nikos Tzouvelekis
Nikos Tzouvelekis
8,155 Points

HI :) nothing wrong about your code … if you run this and go to preview says :

Frog.cs(15,250): error CS1525: Unexpected symbol `end-of-file' Compilation failed: 1 error(s), 0 warnings

so at the end of the code you miss one } so if you add one curly brace at the end its ok

tell me if it is ok :)

thank you