Hi Guys,
My task is a console application that is meant to read 2 text files full of words and to output one text file from both of these. The outpuuted text file must include data from both text files but remove any repeats. The code below is just not outputting any data and cant see for the life of me why not. Appreciate any help
int i = 0;
while(sr.ReadLine() != null)
{
strList1.Add(sr.ReadLine());
i++;
}
int j = 0;
foreach(int count in strList1[j])
{
j++;
while(sr.ReadLine() != null)
{
sw.WriteLine(strList1[j]);
}
}
int k = 0;
while(sr2.ReadLine() != null)
{
k++;
strList2.Add(sr2.ReadLine());
}
int l = 0;
foreach(int count2 in strList2[l])
{
l++;
while(sr2.ReadLine() != null)
{
if (strList2.Contains(sr2.ReadLine()))
{
//do nothing
}
else
{
sw.WriteLine(strList1[j]);
}
}
}
}