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";
More Related Contents:
- @(at) sign in file path/string [duplicate]
- How can I Unescape and Reescape strings in .net?
- Making a List in C# with three flexible elements in one datatype
- How can I convert String to Int?
- How do I get a consistent byte representation of strings in C# without manually specifying an encoding?
- .NET String.Format() to add commas in thousands place for a number
- In C#, should I use string.Empty or String.Empty or “” to intitialize a string?
- C# string replace does not actually replace the value in the string [duplicate]
- How to remove illegal characters from path and filenames?
- How do I replace the *first instance* of a string in .NET?
- Convert a list to a string in C#
- Are there any Fuzzy Search or String Similarity Functions libraries written for C#? [closed]
- Get the index of the nth occurrence of a string?
- Replace multiple characters in a C# string
- Is there a C# case insensitive equals operator?
- Characters in string changed after downloading HTML from the internet
- Getting hash of a list of strings regardless of order
- Memory Efficiency and Performance of String.Replace .NET Framework
- Parse C# string to DateTime
- Easier way of writing null or empty?
- How can I get a character in a string by index?
- What is the difference between .Equals and == [duplicate]
- What’s a good way of doing string templating in .NET?
- Is there a “String.Format” that can accept named input parameters instead of index placeholders? [duplicate]
- Convert binary string into integer
- DateTime conversion from string C#
- Why only literal strings saved in the intern pool by default?
- Checking for null before ToString()
- What does the @ prefix do on string literals in C#
- Why is the length of this string longer than the number of characters in it?