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 -

java - where to store the user credentials in an enterprise application(EAI)? -

openxml - Programmatically format a date in an excel sheet using Office Open Xml SDK -