Hello All:
I have a streamreader that reads a list of text files store
and puts them in a listbox, doing this thows a "Cannot be null value, parameter name item" exception. There seems to be no way to pass ReadLine to anything but a string what I need is an array, however this does'nt seem to work either
any ideas?
try
{
StreamReader sr = new StreamReader(cboContainer.Text); do
{
strFileName = sr.ReadLine(); this.lstFiles.Items.Add(strFileName);
} while(strFileName != "");
sr.Close();
}
catch(Exception ex)
{
MessageBox.Show("Error Loading " + ex.Message);
}
TIA
MeonR
"The beatings will continue until morale improves
I have a streamreader that reads a list of text files store
and puts them in a listbox, doing this thows a "Cannot be null value, parameter name item" exception. There seems to be no way to pass ReadLine to anything but a string what I need is an array, however this does'nt seem to work either
any ideas?
try
{
StreamReader sr = new StreamReader(cboContainer.Text); do
{
strFileName = sr.ReadLine(); this.lstFiles.Items.Add(strFileName);
} while(strFileName != "");
sr.Close();
}
catch(Exception ex)
{
MessageBox.Show("Error Loading " + ex.Message);
}
TIA
MeonR
"The beatings will continue until morale improves