winforms - C# FilePath Help -


i use openfiledialog search specific file. when user chooses file, want store path in variable. however, these doesn't seem option within openfiledialog?

does know how this?

thanks.

edit: winforms, , don't want save path inclusive of filename, location file is.

this retrieve path based on filename property of openfiledialog.

string path = system.io.path.getdirectoryname(openfiledialog.filename); 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -