Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TraceListenerCollection::Item Property (Int32)

 

Gets or sets the TraceListener at the specified index.

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

public:
property TraceListener^ default[
	int i
] {
	TraceListener^ get(int i);
	void set(int i, TraceListener^ value);
}

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:
© 2017 Microsoft