Live2D 看板娘 / Demo

C# 读取项目中文件路径

//当前应用程序集的执行目录
string dir = AppDomain.CurrentDomain.BaseDirectory;
//当前应用程序集的执行的上级目录
dir = Path.GetFullPath("..");


// 读取到当前虚拟目录的根目录(MVC)
string urlPath = Server.MapPath(path);

 


posted @ 2020-10-15 17:10  KysonDu  阅读(2290)  评论(0编辑  收藏  举报