Sajo
Member
- Joined
- Jul 22, 2020
- Messages
- 17
- Programming Experience
- Beginner
Hello everybody! I have a problem with verbatim string. I want to write this "c:\\projects\\project1\\enter"
I use verbatim string for that. But when I run console it always display me c:\projects\project1\enter. I want to write code which is easier to read.
I want double backslash not just one. In the tutorial, they said that it is enough to use the verbatim string for this case where i need double backslash not just one.
Is the verbatim string no longer used in C# or what?
I use verbatim string for that. But when I run console it always display me c:\projects\project1\enter. I want to write code which is easier to read.
I want double backslash not just one. In the tutorial, they said that it is enough to use the verbatim string for this case where i need double backslash not just one.
Is the verbatim string no longer used in C# or what?
C#:
namespace aplikacija
{
class Program
{
static void Main(string[] args)
{
string name = @" c:\projects\project1\enter";
Console.WriteLine(name);
}
}
}
Last edited by a moderator: