Replace문자열
일치하는 모든 문자열을 치환합니다.
문법
str.Replace(oldValue, newValue)예제
아래 값을 입력하면 예제에 즉시 반영됩니다.
string→result→Console→WriteLine→string text = "Hello World World";
string result = text.Replace("World", "C#");
Console.WriteLine(result); // "Hello C# C#"