TraceListenerCollection.Item Property (String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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

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

public TraceListener this[
	string name
] { get; }


Type: System.String

The name of the TraceListener to get from the list.

Property Value

Type: System.Diagnostics.TraceListener

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

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

.NET Framework
Available since 1.1
Return to top