for(int i=0; i<=textbox.text.length;i++) { textbox.text.tostring[i].tostring; int index=textbox.text.tostring.lastindexof(","); if(i.equals(index)) { textbox.text=textbox.text.remove(index, 1); } }
textbox.Text.Remove(textbox.Text.LastIndexOf(','),1);
textbox.Text = textbox.Text.Remove(Textbox.Text.LastIndexOf(','), 1);
String orgText = textbox.text; int i = orgText.LastIndexOf(","); if(i != -1) { textbox.text = orgtext.Remove(i); }
TextBox1.Text = "aa,bb,cc,dd,ee; string myString = TextBox1.Text; TextBox1.Text = myString.Replace(",", ""); //or if you want space between values TextBox1.Text = myString.Replace(","," ");
string value = "this is a test string.,"; value = value.Trim(); ////verify before removing any character, to avoid the index exception if (value.Length > 1 && value.EndsWith(",")) { textbox.text = value.Substring(0, value.Length - 1); }
string[] a = TextBox.Text.ToString().Split(',');
textbox.text.tostring.Replace(",", "");
textbox.text.tostring.Remove(textbox.text.tostring.Length - 1, 1);
string myText = textbox.text.Trim(); if (myText.EndsWith(",")) myText = myText.Substring(0, myText.Length - 1);
String value = textbox.text; char[] charSeparators = new char[] {','}; String result = String.Join(",", value.Split(stringSeparators, StringSplitOptions.RemoveEmptyEntries));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)