Professional Documents
Culture Documents
Or
string s = "hello world";
s=s.Substring(10, s.Length-10);
Or
string s = "hello world!";
s = s.Substring(Math.Max(0, Math.Min(10, s.Length - 1)));
1,5,12,3412345
Or
string str = "1,5,12,34,";
string removecomma = str.Remove(str.Length-1);
MessageBox.Show(removecomma);
Or
1. string s = "test";
2. s = s.Remove(s.length - 1);
3. Output : "tes"
Removing First and Last Character from String In
C# protected void Page_Load(object sender, EventArgs e)
remove_sym();
Response.Write("<br/>");
Response.Write("<br/>");
Response.Write("<br/>");
Response.Write("<br/>");
Response.Write("<br/>");
Response.Write("<br/>");
Response.Write("<br/>");
Response.Write("<br/>");
Output will be :-