首页 > 其他 > 详细

[Bug]Object reference not set to an instance of an object.

时间:2014-06-25 13:18:52      阅读:241      评论:0      收藏:0      [点我收藏+]

引言

今天在客户这儿,由一个问题导致,需求的变化,不得不修改代码,在记录日志中出现该问题。

原因

通过id查找相关信息,没有判断是否为null,集合是否有数据。

Object reference not set to an instance of an object.

翻译:未将对象引用设置到对象的实例。

总结

这个错误在开发中最常见,由于代码不严谨造成,要考虑到为null的情况,不要嫌麻烦,你现在嫌麻烦,将来麻烦嫌弃你.....

[Bug]Object reference not set to an instance of an object.,布布扣,bubuko.com

[Bug]Object reference not set to an instance of an object.

原文:http://www.cnblogs.com/wolf-sun/p/3806772.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!