SyntaxFix
Write A Post
Hire A Developer
Questions
Things have moved on a bit since this thread started.
Now, you could use
string.Concat(s.TakeWhile((c) => c != '-'));