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 trialFabiola Barrientos
9,467 PointsSome help?
I didnt really understand how Im supposed to pass this unto an int when its a string. Some help would be appreaciated.
2 Answers
Mel Rumsey
Treehouse ModeratorHey there Fabiola Barrientos ,
You'll want to use the override
modifier for this method that has an expected return type of int
.
Hope this helps!
Steven Parker
231,275 PointsYou're very close, but "VocabularyWord" is the name of the class itself. The name of the attribute variable where the string is stored is just "Word":
return Word.GetHashCode();
Fabiola Barrientos
9,467 PointsFabiola Barrientos
9,467 PointsIve already tried that, but when I do I get the message: "VocabularyWord.cs(32,35): error CS0428: Cannot convert method group
GetHashCode' to non-delegate type
int'. Consider using parentheses to invoke the method" Whenever i try to use "(int)" on "VocabularyWord" I get the same message, and when I use it on "GetHashCode()" I get the message: "VocabularyWord.cs(32,34): error CS1001: Unexpected symbol `(', expecting identifier"Fabiola Barrientos
9,467 PointsFabiola Barrientos
9,467 PointsHere is the code