I'm trying to add files with a OpenFileDialog to a listview. This is what
I've come up with sofar:
protected void ButAddClick(obj ect sender, System.EventArg s e)
{
OpenFileDialog MyDialog = new OpenFileDialog( );
MyDialog.Multis elect = true ;
MyDialog.Filter = "WAVE files (*.wav)|*.wav|A ll files (*.*)|*.*" ;
MyDialog.Restor eDirectory = true ;
MyDialog.Title = "Add Files";
if (MyDialog.ShowD ialog() == DialogResult.OK )
* foreach (int i in MyDialog.FileNa mes())
* listView.Items. Add(MyDialog.Fi leNames(i), i);
}
But the compiler says: "'System.Window s.Forms.FileDia log.FileNames'
denotes a 'property' where a 'method' was expected" about both lines with
a *.
Could someone explain to me what I'm doing wrong? TIA!
--
Wim