I want to generate a string with a format
'abc','avc',abc','avc',abc','avc','abc','avc',abc','avc',abc','avc','abc','avc'
The value can be anything or it can be empty.This is my code
string sep = "";
StringBuilder sb = new StringBuilder();
foreach(var l in label.Rows)
{
sb.Append(sep).Append(l.Text);
sep = ",''";
}
this returns me
abc,''abc,''abc,''abc,''abc,''abc,''abc,''abc,''abc,''abc,''abc,''abc,''abc,''abc,''abc
any help will be appreciated.
,?,'abc','avc',abc......