G
Guest
Suppose I have the following code:
string myFormat = "Line1/nLine 2";
string formattedString = string.Format(myFormat);
....that would produce a 2-line output as expected.
But if I load that very same format string from an xml file:
....load xmlNode WorkNode...
string myFormat= WorkNode.Attributes["text"].InnerText.ToString();
string formattedString = string.Format(myFormat);
....the result is a one-line "Line1/nLine 2" output.
How can I get the string.Format method to handle control characters correctly?
string myFormat = "Line1/nLine 2";
string formattedString = string.Format(myFormat);
....that would produce a 2-line output as expected.
But if I load that very same format string from an xml file:
....load xmlNode WorkNode...
string myFormat= WorkNode.Attributes["text"].InnerText.ToString();
string formattedString = string.Format(myFormat);
....the result is a one-line "Line1/nLine 2" output.
How can I get the string.Format method to handle control characters correctly?