Hi Guys
NP132 StringBuilder/Remove()
In the following what is the function of Remove() method (highlighted in yellow). Because I am unable to understand the following second output. Please explain.
myStringBuilder = frRoomans, Romans, friends, iends
Thank you
using System;
using System.Text;
class MainClass
{
public static void Main()
StringBuilder myStringBuilder = new StringBuilder();
myStringBuilder.Append("friends");
myStringBuilder.Insert(2, "friends, ");
myStringBuilder.Insert(2, "Romans, ", 3);
Console.WriteLine("myStringBuilder = " + myStringBuilder);
myStringBuilder.Remove(4, 7);
}
/*
myStringBuilder = frRomans, Romans, Romans, friends, iends
*/