经常有人问这个简单的问题,还是给大家写出来吧:
string text1= Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);