I have a form exe. now on button click i want it to save a file to where it has been opened from, e.g. if i give this exe to you and you copy it to c
exe
You can have a look at using AppDomain.BaseDirectory Property
Gets the base directory that the assembly resolver uses to probe for assemblies.
You also need to look at using Path.Combine Method (String, String)
Combines two strings into a path.