Nullable object must have a value?

后端 未结 8 2414
旧时难觅i
旧时难觅i 2020-12-09 14:54

On the line: bool travel = fill.travel.Value; I am getting the following error:

Nullable object must have a value

a

8条回答
  •  情书的邮戳
    2020-12-09 15:03

    You will get a InvalidOperationException if you access the Nullable.Value property when the HasValue property is false.

提交回复
热议问题