read c.txt
write only different values to 21.txt
its ok
but I cant read sentece it only read line :(
c.txt have senteces so I want to read word word to write 21.txt line line :).
static void Main(string[] args)
{
string d = @"C:\C.txt";
FileStream f = new FileStream(d,FileMode.Open);
StreamReader s = new StreamReader(f);
string d2 = @"C:\21.txt";
FileStream f2 = new FileStream(d2,FileMode.Create, FileAccess.Write);
StreamWriter s2 = new StreamWriter(f2);
ArrayList lst = new ArrayList();
string line;
while ((line = s.ReadLine()) != null)
{
if(!lst.Contains(line)){
lst.Add(line);
}
}
foreach(Object lstt in lst){
s2.WriteLine(lstt);
}
s2.Flush();
s2.Close();
s.Close();
Console.ReadLine();
}