private static string EncodeFromFile(Chiper chiper, string fileName, int lines = ALL_LINES) { string[] content = File.ReadAllLines(fileName); if (lines == ALL_LINES) { lines = content.Length; } StringBuilder builder = new StringBuilder(); for (int i = 0; i < lines; i++) { builder.AppendLine( chiper.Encode(content[i])); } string encoded = builder.ToString(); Console.WriteLine(encoded); Console.ReadLine(); return(encoded); }