Bagikan melalui


RowIndexOutOfRangeException Kelas

Definisi

Pengecualian yang dilemparkan ketika indeks yang tidak valid disediakan saat mengakses baris dalam PipelineBuffer.

public ref class RowIndexOutOfRangeException : ApplicationException
[System.Serializable]
public class RowIndexOutOfRangeException : ApplicationException
[<System.Serializable>]
type RowIndexOutOfRangeException = class
    inherit ApplicationException
Public Class RowIndexOutOfRangeException
Inherits ApplicationException
Warisan
RowIndexOutOfRangeException
Atribut

Contoh

Contoh kode berikut melempar RowIndexOutOfRangeException karena NextRow belum dipanggil terlebih dahulu.

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  

Keterangan

Pengecualian ini dilemparkan saat mencoba mengakses baris dalam PipelineBuffer indeks menurut dan indeks yang disediakan lebih besar dari jumlah baris dalam buffer atau kurang dari nol.

Mengakses CurrentRow properti PipelineBuffer objek tanpa panggilan NextRow pertama juga akan melemparkan pengecualian ini karena CurrentRow properti belum dimajukan ke baris pertama dalam koleksi.

Konstruktor

RowIndexOutOfRangeException()

Menginisialisasi instans baru kelas RowIndexOutOfRangeException.

Berlaku untuk