To get specific part of a string in c#

Viewed 130767

I have a string

string a = "abc,xyz,wer";

Now, I need a part of this string like

string b = "abc";

I need everything before the first comma.How shall I get it?

5 Answers
Related