nullable object must have a value

前端 未结 8 1750
梦如初夏
梦如初夏 2020-11-30 00:17

There is paradox in the exception description: Nullable object must have a value (?!)

This is the problem:

I have a DateTimeExtended class, tha

8条回答
  •  囚心锁ツ
    2020-11-30 00:51

    Try dropping the .value

    DateTimeExtended(DateTimeExtended myNewDT)
    {
       this.MyDateTime = myNewDT.MyDateTime;
       this.otherdata = myNewDT.otherdata;
    }
    

提交回复
热议问题