I believe Jon is right. String literals are stored in resource files as
strings. Backslashes are used in code to allow the compiler to identify
literal characters as opposed to tokens. There is no need for them in a
resource file. And one of the "new things" in Visual Studio 2005 that really
irritates me is that the debugger inserts escape characters into the strings
it shows. Occasionally, I have had the experiences of copying text from a
Watch, only to have to manually un-escape it in order to view it in NotePad,
where I can see it more easily. I wonder if this feature is something one
can turn off somehow...
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
"Jon Skeet [C# MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> KNG <(E-Mail Removed)> wrote:
>> When storing a regular expression in a resource file then extract using
>> "Resources.xxxx" all backslashes are now escaped. Is this normal
>> behaviour
>> and if so how do I get back the actual value.
>
> How are you determining that the backslashes are escaped? If you're
> looking in the debugger, chances are that's the problem and the strings
> are fine.
>
> See http://www.pobox.com/~skeet/csharp/s....html#debugger
>
> --
> Jon Skeet - <(E-Mail Removed)>
> http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
> If replying to the group, please do not mail me too