using System; using System.Collections.Generic; using System.Linq; using System.Text; //using System.IO; namespace ConsoleApplication1 { class Program { static string peredel(string a) { string text = System.IO.File.ReadAllText(a); char[] textar = text.ToCharArray(); string end2 = ""; end2 += textar[0]; for (int i = 1; i < textar.Length; ++i) { bool check = true; string end = ""; for (; textar[i - 1] != '.'; ++i) { if (textar[i] == ',') check = false; end += textar[i]; } if (check) end2 += end; } return end2; } static void Main(string[] args) { Console.WriteLine(peredel(@"D:\1.txt")); } } }