Answers for "replace en c#"

C#
2

how to replace string in c#

string string1 = "A man i hurry just jumped on a tail of a dog and dog has bit him damagingly";
Console.WriteLine(string1.Replace("man","Child")) ;
Posted by: Guest on October-31-2021
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