datarow.itemarray 属性
通过一个数组来获取或设置此行的所有值。
命名空间:system.data
程序集:system.data(在 system.data.dll 中)
代码示例:
异常:
异常类型
条件
<a target="_blank" href="http://msdn.microsoft.com/zh-cn/library/system.argumentexception(v=vs.80).aspx">argumentexception</a>
数组大于表中的列数。
<a target="_blank" href="http://msdn.microsoft.com/zh-cn/library/system.invalidcastexception(v=vs.80).aspx">invalidcastexception</a>
<a target="_blank" href="http://msdn.microsoft.com/zh-cn/library/system.data.constraintexception(v=vs.80).aspx">constraintexception</a>
编辑破坏了约束。
<a target="_blank" href="http://msdn.microsoft.com/zh-cn/library/system.data.readonlyexception(v=vs.80).aspx">readonlyexception</a>
编辑试图更改只读列的值。
<a target="_blank" href="http://msdn.microsoft.com/zh-cn/library/system.data.nonullallowedexception(v=vs.80).aspx">nonullallowedexception</a>
<a target="_blank" href="http://msdn.microsoft.com/zh-cn/library/system.data.deletedrowinaccessibleexception(v=vs.80).aspx">deletedrowinaccessibleexception</a>
该行已被删除。
datarow.itemarray 属性源代码实现: