How to generate xs:Date in WCF OperationContract parameter

前端 未结 5 1713
感动是毒
感动是毒 2020-12-15 07:21

For parameters to an OperationContract that represent a date only (no time component or timezone designator), it is desirable to use xs:Date, to avoid any ambiguity or probl

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-15 07:50

    Unfortunately WCF doesn't support the xs:Date type. You'd have to create your own "DateOnly" struct, like:

     _
    public struct DateOnly
        public Month as Integer
        public Day as Integer
        public Year as Integer
    end struct
    

提交回复
热议问题