I have a console application, added a resource file (.resx) in the project, and I added a string like this:
**Name** **Value**
ArgInvalid The arguments are invalid...
\t/a\t\tShow all the result.
Then in the program, I wrote Console.WriteLine(Resource.ArgInvalid);
but what it shows is \t/a\t\tShow all the result. What I want is that \t should be treated as tab, so how to make it print string as following:
/a Show all the result.
This is answered in: tabbing in C# resource file
Enter the tab character in your resource file rather than \t – \t is something interpretted by C#, but not all languages.
If you really want to leave \t in your resource file, then you’ll have to do:
This will replace the \t characters in the resource string with actual tab characters.