I read the text from the file, I need to process it and insert it into another file. Used two ways they are commented out and not one of them is working. What could be the problem?
public static void EditorText(string a) { string newText = Regex.Replace(a, "[\"-.?!)(,:]", ""); newText = string.Join(" ", newText.Split(' ').Distinct()); //var test = File.AppendText(@"C:путь"); //test.WriteLine(newText); // StreamWriter test2 = new StreamWriter(@"C:путь"); // test2.WriteLine(newText); } static void Main(string[] args) { StreamReader sr = new StreamReader(@"C:путь", Encoding.Default); var test = sr.ReadToEnd(); EditorText(test); } } }