I completed my winform application.
I want to add a csv file. So my application will reach with this path.
How can I get published locastion's path?
I completed my winform application.
I want to add a csv file. So my application will reach with this path.
How can I get published locastion's path?
I think you mean following with published locations:
Environment.CurrentDirectory
Environment.GetFolderPath(...)
with one of following parameter
SpecialFolder.ApplicationData
SpecialFolder.Desktop
...
etc.
See http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx
If you programmatically want to get your form's execution path to access your CSV, use
string path = (new System.Uri(Assembly.GetExecutingAssembly().CodeBase)).AbsolutePath;
inside your form.
and then Path.Combine(path, CSVFilename);