I would like to get the path to the execution directory of a Windows Forms application. (That is, the directory in which the executable is located.)
Does anyone know
string apppath = (new System.IO.FileInfo (System.Reflection.Assembly.GetExecutingAssembly().CodeBase)).DirectoryName;