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 trialKyle Puckett
2,488 PointsTrouble renaming private field
Having trouble making the NumFliesEaten field private and rename it to match the private field naming conventions used in this course.
Seems pretty straight forward but can't get it to compile..?
namespace Treehouse.CodeChallenges
{
class Frog
{
private int NumFliesEaten _numFliesEaten;
}
}
2 Answers
Steven Parker
231,261 PointsYou still have the old name there.
You added the new name following the private field convention, but you haven't removed the old name yet.
Kyle Puckett
2,488 PointsAh, thank you so much!
Kyle Puckett
2,488 PointsKyle Puckett
2,488 PointsThanks for the response but I do not understand what you mean by "removed the old name?"
Steven Parker
231,261 PointsSteven Parker
231,261 PointsIn the current line, you have both the old name and the new name:
private int NumFliesEaten _numFliesEaten;
But you only want the new name:
private int _numFliesEaten;