Replacing a string in a file
C#
4
Posts
2
Posters
0
Views
1
Watching
-
Hi , i want to make a utility using c# similar to replace function in the notepad. i have a file in which i want to replace the all the instances of a string with another string. Help me in doing that ......... thanks and regards sankalp verma
Sankalp Verma
-
Hi , i want to make a utility using c# similar to replace function in the notepad. i have a file in which i want to replace the all the instances of a string with another string. Help me in doing that ......... thanks and regards sankalp verma
Sankalp Verma
-
Open the file and read the contains of the file to a string. Then use, for example: string myText = myText.Replace("apple", "mango");
-
But i have to save the contents to the file also......... how do i save them into the file?
Sankalp Verma