Answers for "replace index in string c#"

C#
0

replace index in string c#

using System.Text;
var theString = "ABCDEF";
var sb = new StringBuilder(theString);
sb[2] = "r" //replace letter at index 2 with "r"
theString = sb.ToString(); //theString: "ABrDEF"
Posted by: Guest on November-09-2020

Code answers related to "replace index in string c#"

C# Answers by Framework

Browse Popular Code Answers by Language