日期:2014-05-18  浏览次数:20766 次

new StreamWriter("c:\aaaaa.txt") 路径中具有非法字符
StreamWriter sw=new StreamWriter("c:\aaaaa.txt") 

提示路径中具有非法字符,上面的句子该如何写呢

------解决方案--------------------
StreamWriter("c:\\aaaaa.txt")
------解决方案--------------------
StreamWriter sw=new StreamWriter("c:\\aaaaa.txt")

StreamWriter sw=new StreamWriter(@"c:\aaaaa.txt")