❔ XML serialization - internal XML element

How can I get rid of the internal XML of the Value element? Should I add some attribute on field in MetricValue class? I am using deserialization to read such a file.
8 Replies
Ice_trooper
Ice_trooperOP2y ago
It should look like that if possible:
Ice_trooper
Ice_trooperOP2y ago
and classes:
Anton
Anton2y ago
$code
MODiX
MODiX2y ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
Axiss
Axiss2y ago
I think what you are looking for is the XmlText attribute. Apply that to your Value property.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Ice_trooper
Ice_trooperOP2y ago
Thank you. It needed to reconsider my idea, because I use complex type which cannot be used with XmlText. Anyway, good to know that attribute. 😄
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server