TraceListenerCollection.Item Property (Int32)

 

Gets or sets the TraceListener at the specified index.

Namespace:   System.Diagnostics
Assembly:  System (in System.dll)

Public Property Item (
	i As Integer
) As TraceListener

Parameters

i
Type: System.Int32

The zero-based index of the TraceListener to get from the list.

Property Value

Type: System.Diagnostics.TraceListener

A TraceListener with the specified index.

Exception Condition
ArgumentNullException

The value is null.

The index is zero-based. Therefore, you must subtract one from the numerical position of a particular TraceListener to access that TraceListener. For example, to get the third TraceListener, you need to specify myTraceListenerColl[2].

.NET Framework
Available since 1.1
Return to top
Show: