How to make the text in quotes replace uppercase?
static void Main() { string path = @"D:\GITHUB\C#\222.txt"; string s = File.ReadAllText(path); bool toUp = false; var sb = new StringBuilder(); foreach(var c in path) { if(c == '\"') { toUp = !toUp; continue; } sb.Append(toUp ? char.ToUpper(c) : c); } string appendText = s; File.WriteAllText(path, s); }
path.ToUpper()? - Alexey Shimanskypath.ToUpper()it starts swearing for an error - Imp3lStringBuilder? You wrote the text in it, and what do you do with it next? - VladD