Thursday, July 30, 2015

Cannot convert null to 'bool' because it is a non-nullable value type

I got following error: Exception Details: Microsoft.CSharp.
RuntimeBinder.RuntimeBinderException: Cannot convert null to 'bool' because it is a non-nullable value type, today while referencing a .dll file and creating object of a class.

I could hardly solve the issue by just looking into the stack trace. But I could back trace the changes I had made and point out the spot it occurred at. I found that it was caused by improper passing of null object where constructor of my repository class expected object. Some hit and trail got me out of the issue. Please write in the comments if you have faced the exceptions and solved it.

Thank you.

0 comments:

Post a Comment

Hope you liked this post. You can leave your message or you can put your valuable suggestions on this post here. Thanks for the sharing and cooperation!

Popular Posts

Recent Articles