地址拼接是很常见的时候,有时候甚至会用字符串拼接的方式做,但是不同的电脑对地址的处理方式不同,最好的拼接地址的方式是:
string directoryPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TempFile");//存放临时文件的路径
这个方法会自动帮我们处理不同系统的差异
posted on 2018-01-24 14:49 木头人段 阅读(139) 评论(0) 编辑 收藏 举报