I'm getting value "abc,xyz" from database
I want values like s1=abc & s2=xyz
How to remove ',' and getting values abc & xyz seperately.
How to get 2 values from word "abc,xyz' i.e.abc & xyz
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Hamid KhanRank #424 · 5.9K reputationPosted Feb 1, 2015, 8:12 PM EST
split the value
string strWord="abc,xyz";
Strinh [] s= strWord.split(',')
string s1=s[0];
string s2=s[1];
for more question download the word file
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Feb 1, 2015, 8:13 PM EST
// Split string on comma.
// ... This will separate all the words.
string[] words = s.Split(', ');
foreach (string word in words)
{
Console.WriteLine(word);
}