语言

RowIndexOutOfRangeException 类

定义

当访问 a 中的行 PipelineBuffer时,当提供无效索引时抛出的异常。

public ref class RowIndexOutOfRangeException : ApplicationException
[System.Serializable]
public class RowIndexOutOfRangeException : ApplicationException
[<System.Serializable>]
type RowIndexOutOfRangeException = class
    inherit ApplicationException
Public Class RowIndexOutOfRangeException
Inherits ApplicationException
继承
RowIndexOutOfRangeException
属性

示例

以下代码示例抛 RowIndexOutOfRangeException 出 a 因为 NextRow 尚未被先调用。

public override void ProcessInput(int inputID, PipelineBuffer buffer)  
{  
try  
{  
//while (buffer.NextRow())  
//{  
BufferColumn bc = buffer.GetColumnInfo(0);  
//}  
}  
catch (RowIndexOutOfRangeException e )  
{  
}  
}  
Public Overloads Overrides Sub ProcessInput(ByVal inputID As Integer, ByVal buffer As PipelineBuffer)   
 Try   
   Dim bc As BufferColumn = buffer.GetColumnInfo(0)   
 Catch e As RowIndexOutOfRangeException   
 End Try   
End Sub  

注解

当尝试访问 by 索引中的行 PipelineBuffer 且所提供的索引大于缓冲区行数或小于零时,会抛出该异常。

CurrentRow访问对象属性PipelineBuffer而不先调用NextRow也会抛出该异常,因为CurrentRow该属性尚未被推进到集合的第一行。

构造函数

名称 说明
RowIndexOutOfRangeException()

初始化 RowIndexOutOfRangeException 类的新实例。

适用于