sukhjinder82


Comments:

.NET Developers' Reference Card Round-Up

posted by sukhjinder82sukhjinder82(0) 3 years, 10 months ago 0

can anyone solve my problem how to remove _ from string or remove all the character after _
i m using this coding now
int i, j;
i = 0;
j = 2;

// string s = textBox1.Text;

string s = "03_08";

while (i < s.Length )
{

if (s[i] == '_')
{
while (s[i] == '_')
{
s = s.Remove(2, i);





}

}
else
{
i = i + 1;

}
textBox2.Text = s.ToString();

Reply