C#文件路径的问题C:\DocumentsandSettings\chen\桌面\socket客户端\Custom.xml用相对路径怎么读取Custom.x
C#文件路径的问题
C:\Documents and Settings\chen\桌面\socket客户端\Custom.xml
用相对路径怎么读取Custom.xml信息?
[解决办法]
Server.Mappath( "Custom.xml ");
[解决办法]
winform的话用Application.StartupPath+文件夹/文件
web的话可以用HttpContext.Current.Request.PhysicalApplicationPath+文件夹/文件
