开发者

What is a "NullReferenceError" in ASP.NET MVC?

开发者 https://www.devze.com 2023-03-09 09:58 出处:网络
I keep getting \"NullReferenceError\" in my output, could someone kindly expla开发者_如何学编程in what exactly this statement means.Somewhere in your code, you are trying to access a member of a refer

I keep getting "NullReferenceError" in my output, could someone kindly expla开发者_如何学编程in what exactly this statement means.


Somewhere in your code, you are trying to access a member of a reference type, but the variable actually is null. Without code and a stacktrace it's impossible to say what exactly happens. It might be because some parameter is expecting a value but isn't supplied one.


If it helps, a decent description of NullReferenceException -- why/when they occur, and how to prevent them -- at http://www.dotnetperls.com/nullreferenceexception

0

精彩评论

暂无评论...
验证码 换一张
取 消