You
can remove last character or no of last character with below code.
please try this.
static void Main(string[] arg)
{
string temp = "My Name is
Mohammad Maksudur Rahman.>";
var stringValue
= temp.Remove(temp.Length-1);
Console.WriteLine("Your string value: {0}", stringValue);
Console.ReadLine();
stringValue
= temp.Remove(temp.Length-2);
Console.WriteLine("Your string value: {0}", stringValue);
Console.ReadLine();
}
Comments
Post a Comment