对象引用未设置为对象错误的实例. [英] Object reference not set to an instance of an object error.

查看:88
本文介绍了对象引用未设置为对象错误的实例.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

在我的应用程序中,有三个按钮1,2和3当我点击按钮2& 3没有错误信息.然后,当我单击按钮1并在其后单击按钮2和/或3时,出现以下错误消息:

对象引用未设置为对象的实例."

空引用异常未由用户代码处理

Dear All,

In my application there are three buttons 1,2 & 3 when I click on buttons 2 & 3 there is no error message. Then when I click button 1 and after that click on buttons 2 and/or 3 I get the following error message:

"Object reference not set to an instance of an object."

null reference exception was unhanded by user code

推荐答案

清楚地说明了您使用三个按钮的确切含义.再次使用此按钮可能是您得到该错误的原因

错误消息的意思是,您只是忘记了将值分配给特定的变量或方法
explain it clearly what exactly you are doing with three button.if u calling same event again again with this button may be you are getting the error for that

the meaning of error message is that simply you are forgetting the assign the value to the particullar varaible or method


这篇关于对象引用未设置为对象错误的实例.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆