日期:2014-05-19  浏览次数:20758 次

C#文件路径的问题
C:\Documents   and   Settings\chen\桌面\socket客户端\Custom.xml
用相对路径怎么读取Custom.xml信息?

------解决方案--------------------
Server.Mappath( "Custom.xml ");
------解决方案--------------------
winform的话用Application.StartupPath+文件夹/文件
web的话可以用HttpContext.Current.Request.PhysicalApplicationPath+文件夹/文件