© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
25 replies
AdiZ

✅ Split Lines into Array Elements

I've got a list of common English words in the format
word1
word2
word3
word4
word1
word2
word3
word4

And so forth. How can I split this into an array of format `string[] arr = {"word1", "word2", "word3", "word4"}.
I imagine this would be done with .Split() but it's not working for me.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

❔ Split 2D array into 4 chunks.
C#CC# / help
3y ago
Sharing elements of 2 arrays into another array
C#CC# / help
4y ago
❔ Input into an int array
C#CC# / help
3y ago