TraceListenerCollection.Item[String] TraceListenerCollection.Item[String] TraceListenerCollection.Item[String] TraceListenerCollection.Item[String] Property

Definition

Overloads

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Gets or sets the TraceListener at the specified index.

Item[String] Item[String] Item[String] Item[String]

Gets the first TraceListener in the list with the specified name.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Gets or sets the TraceListener at the specified index.

public:
 property System::Diagnostics::TraceListener ^ default[int] { System::Diagnostics::TraceListener ^ get(int i); void set(int i, System::Diagnostics::TraceListener ^ value); };
public System.Diagnostics.TraceListener this[int i] { get; set; }
member this.Item(int) : System.Diagnostics.TraceListener with get, set
Default Public Property Item(i As Integer) As TraceListener

Parameters

i
Int32 Int32 Int32 Int32

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

Property Value

Exceptions

Remarks

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].

See also

Item[String] Item[String] Item[String] Item[String]

Gets the first TraceListener in the list with the specified name.

public:
 property System::Diagnostics::TraceListener ^ default[System::String ^] { System::Diagnostics::TraceListener ^ get(System::String ^ name); };
public System.Diagnostics.TraceListener this[string name] { get; }
member this.Item(string) : System.Diagnostics.TraceListener
Default Public ReadOnly Property Item(name As String) As TraceListener

Parameters

name
String String String String

The name of the TraceListener to get from the list.

Property Value

The first TraceListener in the list with the given Name. This item returns null if no TraceListener with the given name can be found.

Remarks

The Item[String] property is case-sensitive when searching for names. That is, if two listeners exist with the names "Lname" and "lname", Item[String] property will find only the TraceListener with the Name that you specify, not both.

See also

Applies to