获取当前程序的相当路径

static string str = System.Environment.CurrentDirectory;

原文地址:https://www.cnblogs.com/guozhe/p/2993540.html