C#文件路径的问题
C:\Documents and Settings\chen\桌面\socket客户端\Custom.xml
用相对路径怎么读取Custom.xml信息?
[解决办法]
Server.Mappath( "Custom.xml ");
[解决办法]
winform的话用Application.StartupPath+文件夹/文件
web的话可以用HttpContext.Current.Request.PhysicalApplicationPath+文件夹/文件
发布时间: 2012-03-02 14:40:28 作者: rapoo
C#文件路径的问题
C:\Documents and Settings\chen\桌面\socket客户端\Custom.xml
用相对路径怎么读取Custom.xml信息?
[解决办法]
Server.Mappath( "Custom.xml ");
[解决办法]
winform的话用Application.StartupPath+文件夹/文件
web的话可以用HttpContext.Current.Request.PhysicalApplicationPath+文件夹/文件