不,没有。如果采用这种格式,那么就XML Schema而言,它不是有效的dateTime。
您可以做的最好的事情如下:
[XmlIgnore]public DateTime DonotSerialize {get;set;}public string ProxyDateTime { get {return DoNotSerialize.ToString("yyyyMMdd");} set {DonotSerialize = DateTime.Parse(value);}}
不,没有。如果采用这种格式,那么就XML Schema而言,它不是有效的dateTime。
您可以做的最好的事情如下:
[XmlIgnore]public DateTime DonotSerialize {get;set;}public string ProxyDateTime { get {return DoNotSerialize.ToString("yyyyMMdd");} set {DonotSerialize = DateTime.Parse(value);}}