c# - Creating a portable application using text-file datasets -


i have windows form application works data sets text files. tested application on other systems , works, properly.but running application data sets must copy c drive directly. there solution running application without copying data sets c drive or directory?

the form of script read dataset?

streamreader fileitem = new streamreader("c:\\dataset.txt"); 

i hope detailed comments.

it looks looking system.windows.forms.application.startuppath. source

that environment variable, gives path exe file started. means, if run app usb drive g:\myapp. use:

streamreader fileitem = new streamreader(path.combine(application.startuppath, "dataset.txt")); 

Comments

Popular posts from this blog

visual studio - vb.net filter binding source by time -

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -