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 trial

C# C# Streams and Data Processing Reading Data Encoding

UnicodeEncoding.Unicode.GetString()

What have I done wrong?

CodeChallenge.cs
byte[] mysteryMessage = {89, 0, 97, 0};
string messageContents = UnicodeEncoding.Unicode.GetString(mysteryMessage);

1 Answer

Steven Parker
Steven Parker
229,732 Points

You initialized your message with "89, 0, 97, 0", but the instructions said to "initialize it with the following values: 89, 0, 97, 0, 121, 0, 33, 0".

Well that's embarrassing, a simple reading comprehension error. I wonder why this was not picked up as an error in the first task of the challenge?

Steven Parker
Steven Parker
229,732 Points

That is curious. Perhaps you'd want to submit a bug report to Support.