DataColumn值问题 [英] DataColumn Value issue

查看:119
本文介绍了DataColumn值问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有一个数据列,其中的值包含冒号(:).当我将数据绑定到数据列表时,出现对​​象引用错误.请为该问题提供一些建议.

Hi all,
I have a datacolumn with values that contain colon ( : ) in it. When I bind the data to a data list an object reference error is getting. Please provide some suggestions for the issue.

推荐答案

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

当您尝试使用为空的对象的属性时,会发生此错误.更多详细信息:此处 [
Object reference not set to an instance of an object

This error happens when you try to use a property of an object that is null. More details: here[^]

A simple use of Visual studio DEBUGGER can tell you the object because of which it is happening. Just look at the stack trace and put a debugger on that line. Check the objects of that line and see if any one is null and you are trying to use that objects property. Handle the same.


这篇关于DataColumn值问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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