c# 如何找到项目中图片的相对路径

c# 如何找到项目中图片的相对路径

string path = System.Environment.CurrentDirectory;//非Web程序
if (System.Environment.CurrentDirectory != AppDomain.CurrentDomain.BaseDirectory)
{
        path = AppDomain.CurrentDomain.BaseDirectory;//asp.net 程序
        path += "Image\\DefaultImage.gif";

posted on 2017-01-19 10:37  lijingran  阅读(6113)  评论(0编辑  收藏  举报

导航