Deserialize Json Object - DateTime

前端 未结 5 2024
说谎
说谎 2020-12-10 18:37

My web-api returns an User Object. In that object there is a DateTime property. When i\'am reading it in my Application i get an error because the

5条回答
  •  -上瘾入骨i
    2020-12-10 18:57

    Could it be that the DateTime is actually coming back as a "nullable", like "DateTime?" (with the question mark)?

    Because then, it could be NULL, as and ".HasValue == false".

    Only guessing here... :-)

提交回复
热议问题