I have got a problem with XmlWriter during save for example: 0.000036 value. During serialize it’s convert to 3.6E-05 value. I don’t know why!
If someone knows how solve this problem I will be greatful.
Below it’s sample of my code:
XDocument doc = new XDocument();
using (XmlWriter writer = doc.CreateWriter()) {
xs.Serialize(writer,o);
}
XElement xElement = doc.Root;
return xElement;
Well
XmlWriterconverts strongly typed data to string.If you try
you will get
if you try then
you will get
0.000036again.So basically, it’s just the string representation of the value.
By the way, you can also declare a double as