对象引用未设置为vb.net中对象的实例 [英] object reference is not set to an instance of an object in vb.net

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

问题描述

对象引用未设置为vb.net中对象的实例

i我收到错误



  Dim  SC6Report 作为 SC6Reports = _entities.SC6Reports.Where(功能(x)x.IDSC6Reports = SC6ReportID).FirstOrDefault 
bcSC6Report.DataSource = SC6Report
_idSC6Reports = SC6Report.IDSC6Reports /////////// [getting < span class =code-keyword> error ] < / big >
FillRemedialActions(SC6ReportID)
btnSave.btnOperation.Enabled = True
btnRemActionSet.enabledAdd = True
btnRemActionSet.enabledDelete = True
btnRemActionSet.enabledModify = True

解决方案

尝试调试源代码以找出错误发生的位置。

如错误所示,对象是 null

object reference is not set to an instance of an object in vb.net
i am getting error

Dim SC6Report As SC6Reports = _entities.SC6Reports.Where(Function(x) x.IDSC6Reports = SC6ReportID).FirstOrDefault
bcSC6Report.DataSource = SC6Report
_idSC6Reports = SC6Report.IDSC6Reports///////////[getting error]</big>
FillRemedialActions(SC6ReportID)
btnSave.btnOperation.Enabled = True
btnRemActionSet.enabledAdd = True
btnRemActionSet.enabledDelete = True
btnRemActionSet.enabledModify = True

解决方案

Try debugging your source code to figure out where the error occurs.
As the error suggests, an object is null.


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

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