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 trialHailee Miu
959 PointsOverall, help with moving forward or backward.
I have made it this far but I feel like I am not grasping the concepts. For example, I know we learned about a constructor, but I couldn't tell you what it is or does. OR example, why do we have to write Map=map; Also, the challenges take me forever! and by the end it is just guess work based on previous examples.
Is it supposed to feel like this? Or should I go back and start from the beginning to get a better foundational understanding for myself? This is my first experience with coding.
4 Answers
Steven Parker
231,275 PointsThis is not uncommon when learning something totally new. You might enjoy this episode of The Treehouse Show where learning challenges and solutions are discussed (including some suggestions by me!).
In the meantime, maybe this will help with your specific questions:
A constructor a class method that creates a new instance (a new object) based on that class.
And you probably would not write "Map=map
". I expect that "Map" is a class name and "map" is the name of a object (instance) you want to create, so you'd write:
Map map = new Map();
Anthony Bonner
12,895 PointsAfter getting to this point, I agree with Hailee. it feels like a lot of steps and explanations were glossed over or skipped entirely. For example, the Constructor (in general) was mentioned for about 15 seconds, andthe 'base' constructor wasn't mentioned at all.
Hailee Miu
959 PointsThanks!
I just now realized that there were the extra practices that pop up in my home section & a challenge that was emailed to me! Those are the types of things that will help me learn. So I am going to go back through rather than spinning my wheels with new stuff.
Steven Parker
231,275 PointsA challenge was emailed to you? I haven't had that experience here myself!
Hailee Miu
959 PointsWell it wasn't like a personalized thing. It was the WooHoo you finished C# basics, make sure you keep practicing. With a link to the Practice Validation and Exceptions in C# practice workshop. I didn't know that portion of the site existed. I thought the small challenges within the course videos was it.
Steven Parker
231,275 PointsThere are several workshops, some reinforce the courses and some cover extra topics.
Christopher Rogers
1,251 PointsChristopher Rogers
1,251 PointsI know this is old, but I think what Hailee was referring to is the cases when you have to "initialize" a public readonly variable. I struggled with understanding this at first too.
If I understand this correctly, you're assigning "map", the parameter value passed in to the Map() method, to the readonly variable "Map".
Example: