I am working on visual studio 2008 what i want to do is read till the end of the file the code i am using is
StreamReader ^sr= gcnew StreamReader("example.txt");
String ^str;
while(sr->Read()!= 0)
{
str=sr->ReadLine();
textBox2->Text=sr->ReadLine();
MessageBox::Show(str);
}
sr->Close();
what could be used inside while condition that this will read till the end of the file