Hello,
Thanks for your post. I built a sample to check this issue, however, I am
not able to reproduce the problem. It serialize to 0.00000001 (enclosed by
<d> tag) instead of 1E-08. The following is my code, please check it on
your side:
//------------------------code snippet----------------
using System.Xml.Serialization;
using System.IO;
public class A
{
public decimal d;
}
public class Test
{
public static void Main(string[] args)
{
A a = new A();
a.d = 0.00000001m;
XmlSerializer serializer = new XmlSerializer(typeof(A));
TextWriter writer = new StreamWriter("MyDoc.xml");
serializer.Serialize(writer, a);
writer.Close();
TextReader reader = new StreamReader("MyDoc.xml");
A a1 = (A)serializer.Deserialize(reader);
reader.Close();
}
}
//-------------------------end of---------------------------
I look forward to your feedback.
Have a nice day!
Regards,
HuangTM
Microsoft Online Partner Support
MCSE/MCSD
Get Secure! --
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.