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 trialRoger Sullivan
10,992 Pointserror "Class, struct, or interface method must have a return type"
i feel like i'm forgetting something simple. I'm pretty sure i did the constructor just like he did in the tutorial before this challenge.
namespace Treehouse.CodeChallenges
{
class Frog
{
public readonly int TongueLength;
public TongueLength(int tongueLength)
{
int TongueLength = tongueLength;
}
}
}
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! Would it be encouraging to know that you're only off by one word? It asks you to make a constructor for a Frog
that accepts a tongue length. But what you've constructed here is a TongueLength that accepts a tongue length. And we don't have a TongueLength class
So... rethink this part:
public TongueLength(int tongueLength) //This should be a Frog that has a tongueLength
Give it another shot!