nullreferenceexception

What does “Object reference not set to an instance of an object” mean? [duplicate]

梦想的初衷 提交于 2019-11-25 22:45:28
问题 This question already has answers here : What is a NullReferenceException, and how do I fix it? (31 answers) Closed 4 years ago . I am receiving this error and I\'m not sure what it means? Object reference not set to an instance of an object. 回答1: Variables in .NET are either reference types or value types. Value types are primitives such as integers and booleans or structures (and can be identified because they inherit from System.ValueType). Boolean variables, when declared, have a default