Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- StringBuilder text = new StringBuilder();
- int ind = 0;
- int ind1 = 0;
- string word;
- string word1;
- for (int i = ind; i < words1.Count; i++)
- {
- if(words2.Contains(words1[i]))
- {
- word = words1[i];
- ind = words1.IndexOf(word);
- for (int j = ind1; j < words2.Count; j++)
- {
- if(words1.Contains(words2[j]) && words2[j] != word)
- {
- word1 = words2[j];
- ind1 = words2.IndexOf(word1);
- break;
- }
- else
- {
- if(words2[j] != word)
- text.AppendLine(words2[j]);
- }
- }
- }
- else
- {
- text.AppendLine(words1[i]);
- }
- }
- string allText = text.ToString();
- File.WriteAllText(fout, allText);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement