SqlErrorCollection::Item Property (Int32)

 

Gets the error at the specified index.

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

public:
property SqlError^ default[
	int index
] {
	SqlError^ get(int index);
}

Parameters

index
Type: System::Int32

The zero-based index of the error to retrieve.

Property Value

Type: System.Data.SqlClient::SqlError^

A SqlError that contains the error at the specified index.

Exception Condition
IndexOutOfRangeException

Index parameter is outside array bounds.

The following example displays each SqlError within the SqlErrorCollection collection.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: