C#

作者: 前端混合开发 | 来源:发表于2018-05-02 14:13 被阅读1次

    Unrecognized escape sequence for path string containing backslashes

    string foo = "D:\Projects\Some\Kind\Of\Pathproblem\wuhoo.xml";
    

    You can either use a double backslash each time

    string foo = "D:\\Projects\\Some\\Kind\\Of\\Pathproblem\\wuhoo.xml";
    

    or use the @ symbol

    string foo = @"D:\Projects\Some\Kind\Of\Pathproblem\wuhoo.xml";
    

    相关文章

      网友评论

        本文标题:C#

        本文链接:https://www.haomeiwen.com/subject/lpccrftx.html