c# - Reading Selected multiple text files using openfiledialogue in win form app -
i have condition want reading selected multiples text file through openfiledialogue in win form application
i solved want do
openfiledialog1.filter = "*.txt"; openfiledialog1.title = "select text file"; openfiledialog1.multiselect = true; dialogresult dr = this.openfiledialog1.showdialog(); if (dr == system.windows.forms.dialogresult.ok) { list<string> link_list = new list<string>(); foreach (string file in openfiledialog1.filenames) { string[] = system.io.file.readalllines(file); (int = 0; < a.length; i++) { link_list.add(a[i].tostring()); } } alllinks = link_list.toarray(); }
thanks
Comments
Post a Comment