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.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hamid KhanPosted Feb 2, 2015, 1:12 AM
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 LenkaPosted Feb 2, 2015, 1:13 AM
// Split string on comma.
// ... This will separate all the words.
string[] words = s.Split(', ');
foreach (string word in words)
{
Console.WriteLine(word);
}