Answers for "replace in c#"

C#
2

String.Replace() c#

String s = "aaa";
Console.WriteLine($"The initial string: {s}");
s = s.Replace("a", "b").Replace("b", "c").Replace("c", "d");
Console.WriteLine($"Final String: {s}");

// Returns "Final String: ddd"
Posted by: Guest on February-10-2021

C# Answers by Framework

Browse Popular Code Answers by Language