NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TraceListeners.Item (Int32)

Gets or sets the TraceListener at the specified index.

[C#] In C#, this member is the indexer for the TraceListeners class.

[Visual Basic]
Overloads Public Default Property Item( _
   ByVal i As Integer _
) As TraceListener
[C#]
public TraceListener this[
   int i
] {get; set;}
[C++]
public: __property TraceListener* get_Item(
   int i
);
public: __property void set_Item(
   int i,
   TraceListener*
);
[JScript]
returnValue = TraceListenersObject.Item(i);
TraceListenersObject.Item(i) = returnValue;
-or-
returnValue = TraceListenersObject(i);
TraceListenersObject(i) = returnValue;

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed Item property whose type is Object and whose index type is String.

Arguments [JScript]

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

Parameters [Visual Basic, C#, C++]

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

Property Value

A TraceListener with the specified index.

Remarks

The index is zero-based. Therefore, you must subtract one (1) from the numerical position of a particular TraceListener to access that TraceListener. For example, to get the third TraceListener, you need to specify System.ComponentModel.TraceListeners.this (2).

See Also

TraceListeners Class | TraceListeners Members | System.Diagnostics Namespace | TraceListeners.Item Overload List | TraceListeners | TraceListener | DefaultTraceListener | TextWriterTraceListener | Debug | Trace