How to delete the last character from the string?


TrimEnd removes ending characters from a string. this is a common requirement when formatting string.
Example:-
protected void Page_Load(object sender, EventArgs e)
{
string str = "rengan,";
Response.Write(str.TrimEnd(','));
}

No comments:

Post a Comment

Plz Share your comments...