Extend library
#1064
Replies: 1 comment 4 replies
-
Hi, are you able to use DataContractSerializer ? MemoryStream ms = new MemoryStream();
DataContractSerializer ser =
new DataContractSerializer(typeof(Length));
ser.WriteObject(ms, Length.FromCentimeters(100));
ms.Position = 0;
new StreamReader(ms).ReadToEnd().Dump();
ms.Close(); <Length xmlns="http://schemas.datacontract.org/2004/07/UnitsNet" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Value>100</Value>
<Unit>Centimeter</Unit>
</Length> |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello ! Do I have any chance to extend this library ? I want to implement IXmlSerializable in order to parse the units using XmlSerializer from Microsoft. It is enough for me to have something like 5V for 5 volts
Beta Was this translation helpful? Give feedback.
All reactions