DelimitedListTraceListener.Delimiter Property

 
System_CAPS_noteNote

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

Gets or sets the delimiter for the delimited list.

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

public string Delimiter { get; set; }

Property Value

Type: System.String

The delimiter for the delimited list.

Exception Condition
ArgumentNullException

Delimiter is set to null.

ArgumentException

Delimiter is set to an empty string ("").

The default delimiter is ";" (semicolon). The following configuration file example shows the setting of the Delimiter property using the delimiter attribute in a configuration file:

<configuration>
  <system.diagnostics>
    <trace autoflush="false" indentsize="4">
      <listeners>
        <add name="delimitedListener" 
          type="System.Diagnostics.DelimitedListTraceListener" 
          delimiter=":" 
          initializeData="delimitedOutput.txt" 
          traceOutputOptions="ProcessId, DateTime" />
        <remove name="Default" />
      </listeners>
    </trace>
  </system.diagnostics>
</configuration>

.NET Framework
Available since 2.0
Return to top
Show: