private void ExecuteReplacedMode() { Viewer displayer = new Viewer(string.Format("Count of" + " replaced string \n<{0}>", _args[0])); //todo Replacer stringReplacer = new TextReplacer(_args[0], 1000); //todo const stringReplacer.ReplaceString(_args[1], _args[2]); displayer.ShowMessage(stringReplacer.ReplacementsCount); }
static void Main(string[] args) { //try //{ // ConsoleController application = new ConsoleController(args); // application.Run(); //} //catch (Exception) //{ // Console.WriteLine("Instruction");// todo //} using (TextReplacer rep = new TextReplacer(".\\Instruction.txt", "a")) { rep.ReplaceString("77"); } Console.ReadKey(); }