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 Parsing Data Reading Line By Line

C# - Split the string by spaces into an array of strings.

Complete the following code to split the string by spaces into an array of strings. string[] words = "The quick brown fox jumped over the lazy dog".__(what goes here?)

I tried .split('') .Split(' '), etc...

PLease halp. Thank you

1 Answer

Matthew Long
Matthew Long
28,407 Points

I believe you have it right with Split(' '), but are you adding a second . by accident?

Yes, I was apparently. I thought I wasn't. I dislike the format of the question (it was a code challenge). C# is proving much more tedious than JS.

Thanks