am coding a small program to read the contents from 2 files.
1 is the parent file and another is the input file. And compare the
if the lines exists in both the files.
Now i have a error and got stuck..and cant figure out where it when
wrong.
this is the main coding part which i feel has an error.
try
{ // Read Parent File
FileStream file = new FileStream(tbxFile.Text,FileMode.Open);
StreamReader sr = new StreamReader(file);
// Read Input File
FileStream input = new FileStream(tbxInput.Text,FileMode.Open);
StreamReader sr1 = new StreamReader(input);
string line = null;
string inputLine=sr1.ReadLine();
inputLine = inputLine.Trim();
string output1 = null;
while(((line = sr.ReadLine())!=null))
{
if(line.IndexOf(inputLine)>0)
{
output1 = inputLine;
}
}
the "output1" always return a value NULL
can someone pls help me
thanks in advance.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/XGgtlB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Microsofts_C_Sharp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/