Linguaggio

RowIndexOutOfRangeException Classe

Definizione

L'eccezione che viene lanciata quando viene fornito un indice non valido accedendo a una riga in un PipelineBuffer.

public ref class RowIndexOutOfRangeException : ApplicationException
[System.Serializable]
public class RowIndexOutOfRangeException : ApplicationException
[<System.Serializable>]
type RowIndexOutOfRangeException = class
    inherit ApplicationException
Public Class RowIndexOutOfRangeException
Inherits ApplicationException
Ereditarietà
RowIndexOutOfRangeException
Attributi

Esempio

Il seguente esempio di codice mostra un RowIndexOutOfRangeException perché NextRow non è stato chiamato per primo.

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  

Commenti

Questa eccezione viene fatta quando si tenta di accedere a una riga in un PipelineBuffer indice by e l'indice fornito è o maggiore del numero di righe nel buffer o inferiore a zero.

Accedere alla CurrentRow proprietà dell'oggetto PipelineBuffer senza prima chiamare NextRow lancia anche questa eccezione perché la CurrentRow proprietà non è stata avanzata alla prima riga della collezione.

Costruttori

Nome Descrizione
RowIndexOutOfRangeException()

Inizializza una nuova istanza della classe RowIndexOutOfRangeException.

Si applica a