locked
quotation inside quotation does not render RRS feed

  • Question

  • User-2066630380 posted

    So I'm completely stuck with how one should do this.

    in my code behind I'm trying to get a quote behind the @ and all I get is the \"   . After testing I discovered this only works for when the webapp is rendered to a browser, but in this case its not rendering to a browser, I just need the string to pull up a file on my drive. How can I get this quotation mark within quotation mark for a file IO read?

    thanks

    string taskResourceLocation = "@\"" + Settings.Default.TaskResources;
    
     var filename = string.Format(CultureInfo.InvariantCulture, "{0}{1}\\{2}{3}", taskResourceLocation, "request_", "en", ".txt");
                var path = File.ReadAllText(filename); 

    actually I've seamed to resolved it, but just want to confirm if this would mean the same thing. I've bypassed the "@\"" by using this code. Would that mean the same thing?

        string taskResourceLocation = Settings.Default.TaskResources;
                var filename = string.Format(CultureInfo.InvariantCulture, "{0}\\{1}{2}{3}", taskResourceLocation, "request_", "en", ".txt");
                var path = File.ReadAllText(@filename); 

    Friday, May 1, 2015 5:36 AM

Answers