Edit this page
Available for: UI for ASP.NET AJAX | UI for ASP.NET MVC | UI for WPF | UI for WinForms | UI for Silverlight

Settings

TxtFormatProvider allows to import and export TXT documents. Additionally, there are a number of settings that allow you to modify the import/export. The current article outlines the available settings.

TxtFormatProvider exposes a Settings property of type TxtSettings. This allows you to specify the following:

  • Delimiter: Gets or sets the list separator. By default the TxtFormatProvider class imports and exports files using the list separator specified by the current culture of the system.

  • Quote: Gets or sets the quote symbol

  • HasHeaderRow: Specifies whether the document has a header row. The default value is false.

Example 1 shows how to create and specify a particular setting to a TxtFormatProvider.

[C#] Example 1: Use TxtSettings

TxtFormatProvider provider = new TxtFormatProvider();
provider.Settings.Delimiter = ';';
provider.Settings.Quote = '^';
provider.Settings.HasHeaderRow = true;