SyntaxFix
Write A Post
Hire A Developer
Questions
To avoid getting expections at run time , do something like this.
There are chances of having empty string sometimes,
string a = "abc,xyz,wer"; string b=string.Empty; if(!string.IsNullOrEmpty(a )) { b = a.Split(',')[0]; }