Hi,
In c#, i have a string array like
string text[] = value.split(',');
Assume text contains the values a, ,b,-,c,d, ,
it has 2 white spaces and 1 hyphen values
i want to remove the white spaces and hyphens and want to make it as a,b,c,d
i have tried this
for (int counttext = 0; counttext < text.Length; counttext++)
{
if (text[counttext] == "" || text[counttext] == "-")
{
text[counttext].Remove(counttext,0);
}
}
but for final value i got error,.. in remove function
can anyone help me?