Hi All,
Currently I have the following code:
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
var myObject = new MyObject() {Text = "€ 232.22"};
StringBuilder sb = new StringBuilder();
var xmlWriterSettings = new XmlWriterSettings();
XmlWriter writer = XmlWriter.Create(sb, xmlWriterSettings);
new XmlSerializer(typeof(MyObject)).Serialize(writer, myObject);
Console.WriteLine(sb.ToString());
Console.ReadKey();
}
}
[Serializable]
public class MyObject
{
public MyObject()
{
}
[XmlAttribute()]
public string Text { get; set; }
}
}
And the issue I have id that currently the serializer when i give it a euro symbol € it returns a ?, so then I tried passing € but it encodes the & and returns € Anyone know of an elegant way to solve this issue?
Many thanks,
Chris