private static Word ReadWord(string substring, ref int i, ref char c) { Word word = new Word(); bool flag = true; Letter l = new Letter(c); word.AddSimbol(l); if (i != substring.Length) { do { c = substring[i]; i++; if (c >= 'а' && c <= 'я' || c >= 'А' && c <= 'Я' || c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c == '-' || c == '\'') { l = new Letter(c); word.AddSimbol(l); } else { flag = false; } } while (flag && i < substring.Length); } c = ' '; return(word); }