Answers for "replace text in doc c#"

C#
1

replace text c# file

string text = File.ReadAllText("test.txt");
text = text.Replace("some text", "new value");
File.WriteAllText("test.txt", text);
Posted by: Guest on July-11-2021
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

C# Answers by Framework

Browse Popular Code Answers by Language