I'm trying to make a little code in C# that will open a .cfg file and search for a word and then replace it with a text , but that's not everything because i already found how to do this , but the problem is that i want to do some checks like if the file contains "Hello" OR "Hi" OR "blabla" somewhere, replace it with "Bye" (it's just an example)
I want to do this with a simple code
NOTE: already used this one but it looks like it's for one check only ...
string var = File.ReadAllText("mycfg.cfg");
var = var.Replace("Hi", "Bye");
File.WriteAllText("mycfg.cfg", var);
and one more thing is that i'm goin to do the same thing but another 2 times.