How can I get XmlSerializer to encode bools as yes/no?

后端 未结 7 2019
情话喂你
情话喂你 2020-12-31 05:49

I\'m sending xml to another program, which expects boolean flags as \"yes\" or \"no\", rather than \"true\" or \"false\".

I have a class defined like:



        
相关标签:
7条回答
  • 2020-12-31 06:24

    What you're needing to do sounds more like a display issue. If your application allows, you will be better off keeping the data type as a boolean and displaying Yes/No in your user interface.

    0 讨论(0)
提交回复
热议问题