Serializing DateTime to time without milliseconds and gmt

前端 未结 2 1512
清酒与你
清酒与你 2020-12-03 17:36

I have created a C# class file by using a XSD-file as an input. One of my properties look like this:

 private System.DateTime timeField;

 [System.Xml.Serial         


        
2条回答
  •  既然无缘
    2020-12-03 18:11

    You could create a string property that does the translation to/from your timeField field and put the serialization attribute on that instead the the real DateTime property that the rest of the application uses.

提交回复
热议问题