Escape Sequenze in Resource File

Hi!

I've the following problem. I've created a multilingual application and put all the strings in a resource file for each language. This all works fine so far.

The problem is if there are any escape sequences in the strings like "\n". If I show this string in a MessageBox "\n" is not replaced with a NewLine.

How is the best practice to accomplish this?

greets,
Markus

[386 byte] By [MarkusFritz] at [2007-12-16]
# 1
The problem is that you are using the string after compilation - this means that the c# compiler never gets the chance to swap "\n" for a new line.

Could you split the string into two parts and add them seperately?

e.g. MessageBox.Show(resourceManager.getString("part1") + "\n" + resourceManager.getString("part2"));

Not tidy, I agree.

Paul_G at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified