❔ Need Help Backslash issue
Whenever i type in the backlash it brings ina weird character
5 Replies
thats because the backslash has a special meaning in string literals
"\""
is a string that contains the double quote character
"\t"
is a string that contains the tab character,
"\r\n"
is a carriage return and a line feed character (the windows new line character sequence)
these are so called escape sequences
so to use the \
as raw character u would need to escape it as well "\\"
, basically by escaping the escape character (the backslash)
or u can use a verbatim string literal, this means that escape sequences are disabled: @"\"
this is all assuming u hardcoded that string in ur code,
if this isnt the case u have to give more details how u get that stringwhat font are you using in your editor?
Super User
Why a backslash displays as "W"+strikethrough in Netbeans?
I'm facing a strange problem with Netbeans.
In the editor, when I type a backslash(), I see a W with a strikethrough (as shown in the attached image).
So the c:\abc is displaying as:
But, when I...
Thank you
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.