I suspect that EntitySlot
(or a base class of EntitySlot
) is overriding Equals
which is incorrectly marking the entitySlot
instance and null
as equal. You can test this out by comparing the result of .Equals()
and .ReferenceEquals()
.
It is not null - you can clearly see the properties initialized.
But your equality check is showing null - please check your Equals method overload as Cameron has mentioned.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.