You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OnDoc/CSVNET/VSdoc/topic_000000000000002F.html

1208 lines
22 KiB

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="GENERATOR" content="VSdocman - documentation generator; https://www.helixoft.com" />
<link rel="icon" href="favicon.ico">
<title>CSVSettings Class</title>
<link rel="stylesheet" type="text/css" href="msdn2019/toc.css" />
<script src="msdn2019/toc.js"></script>
<link rel="stylesheet" type="text/css" href="msdn2019/msdn2019.css">
<script src="msdn2019/msdn2019.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shCore_helixoft.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushVb.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushCSharp.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushFSharp.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushCpp.js" type="text/javascript"></script>
<script src="SyntaxHighlighter/scripts/shBrushJScript.js" type="text/javascript"></script>
<link href="SyntaxHighlighter/styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="SyntaxHighlighter/styles/shThemeMsdnLW.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
SyntaxHighlighter.all();
</script>
<link rel="stylesheet" type="text/css" href="vsdocman_overrides.css">
</head>
<body style="direction: ltr;">
<div id="topic">
<!--HEADER START-->
<div id="header">
<div id="header-top-container">
<div id="header-top-parent-container1">
<div id="header-top-container1">
<div id="runningHeaderText1"><a id="headerLogo" href="#" onclick="window.location.href = getCssCustomProperty('--headerLogoLink'); return false;">logo</a></div>
<div id="runningHeaderText1b"><script>
document.write(getCssCustomProperty('--headerTopCustomLineHtml'));
</script></div>
</div>
</div>
<div id="header-top-container2">
<div id="runningHeaderText">CSVNET Reference</div>
<div id="search-bar-container">
<form id="search-bar" action="search--.html">
<input id="HeaderSearchInput" type="search" name="search" placeholder="Search" >
<button id="btn-search" class="c-glyph" title="Search">
<span>Search</span>
</button>
</form>
<button id="cancel-search" class="cancel-search" title="Cancel">
<span>Cancel</span>
</button>
</div>
</div>
</div>
<hr />
<div id="header-breadcrumbs"></div>
<div id="headerLinks">
</div>
<hr />
</div>
<!--HEADER END-->
<div id="mainSection">
<div id="toc-area">
<div id="toc-container" class="stickthis full-height">
<div id="-1"></div>
<div id="c-1">
<div id="ci-1" class="inner-for-height"></div>
</div>
</div>
</div>
<div id="mainBody">
<h1 class="title">CSVSettings Class</h1>
<div class="metadata">
Namespace:
<a href="topic_0000000000000000.html">CSVNET</a>
<br />Assembly: CSVNET (in CSVNET.dll)
</div>
<summary-info>/// Settings to configure how a CSV file is parsed
///</summary-info>
<div class="section_container">
<div id="syntaxSection" class="section">
<div id="syntaxCodeBlocks">
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCornerActive">
</div>
<div class="codeSnippetTab csFirstTab csActiveTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csNaTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csNaTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csLastTab csNaTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCorner">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeVB">
<pre xml:space="preserve" class="brush: vb">Public Class CSVSettings</pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCorner">
</div>
<div class="codeSnippetTab csFirstTab csNaTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csActiveTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csNaTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csLastTab csNaTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCorner">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeCsharp">
<pre xml:space="preserve" class="brush: csharp">public class CSVSettings</pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCorner">
</div>
<div class="codeSnippetTab csFirstTab csNaTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csNaTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csActiveTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csLastTab csNaTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCorner">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeCpp">
<pre xml:space="preserve" class="brush: cpp">public ref class CSVSettings </pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
<div class="codeSnippetContainer">
<div class="codeSnippetTabs">
<div class="codeSnippetTabLeftCorner">
</div>
<div class="codeSnippetTab csFirstTab csNaTab codeVB">
<a>VB</a>
</div>
<div class="codeSnippetTab csNaTab codeCsharp">
<a href="javascript: CodeSnippet_SetLanguage('Csharp');">C#</a>
</div>
<div class="codeSnippetTab csNaTab codeFsharp">
<a href="javascript: CodeSnippet_SetLanguage('Fsharp');">F#</a>
</div>
<div class="codeSnippetTab csNaTab codeCpp">
<a href="javascript: CodeSnippet_SetLanguage('Cpp');">C++</a>
</div>
<div class="codeSnippetTab csActiveTab csLastTab codeJScript">
<a href="javascript: CodeSnippet_SetLanguage('JScript');">JScript</a>
</div>
<div class="codeSnippetTabRightCornerActive">
</div>
<div style="clear:both;">
</div>
</div>
<div class="codeSnippetCodeCollection">
<div class="codeSnippetToolbar">
<a title="Copy to clipboard." href="javascript:void(0)" onclick="CopyCode(this);">Copy</a>
</div>
<div class="codeSnippetCode codeJScript">
<pre xml:space="preserve" class="brush: js">public class CSVSettings</pre>
</div>
<div class="codeSnippetCode codeNA">
<pre xml:space="preserve">This language is not supported or no code example is available.</pre>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">Properties</a></span>
<div>&nbsp;</div>
</div>
<div id="PropertiesSection" class="section">
<table class="memberListTable">
<tr>
<th></th>
<th>
Name
</th>
<th>
Description
</th>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000034.html">AllowNull</a>
</td>
<td>
/// Set this value to true to allow nulls to be rendered in CSV files when serializing
/// and deserializing.
///
/// CSV files by default do not have a mechanism for differentiating between null fields
/// and empty fields. If this field is set to false, both `null` and empty string will
/// render as an empty string.
///
/// If this field is set to true, all non-null fields will be enclosed by the text qualifier,
/// and fields that are null will be represented as `NullToken`.
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000037.html">AllowSepLine</a>
</td>
<td>
/// When reading a CSV file, if the first line contains the instruction `sep=`, use this
/// to determine the separator for the file.
///
/// The &quot;sep&quot; line is a feature exclusive to Microsoft Excel, which permits CSV files to
/// more easily handle European files where the comma character is often a separator between
/// numeric values rather than a field delimiter.
///
/// If this flag is set to true, when you parse a CSV, the first line of the parsing can override
/// the field separator logic for each individual instance of parsing, but it will not change
/// the `FieldDelimiter` in your settings object.
///
/// More information:
/// * [Original Issue Report](https://github.com/tspence/csharp-csv-reader/issues/28)
/// * [Superuser Article](https://superuser.com/questions/773644/what-is-the-sep-metadata-you-can-add-to-csvs)
/// * [Tjitjing Blog](https://blog.tjitjing.com/index.php/2016/07/set-separator-delimiter-in-csv-file-to-open-correctly-in-excel.html)
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000038.html">AssumedHeaders</a>
</td>
<td>
/// If `HeaderRowIncluded` is false, use these values for the headers
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000040.html">BufferSize</a>
</td>
<td>
/// When reading data from a stream, this is the block size to read at once.
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000042.html">DateTimeFormat</a>
</td>
<td>
/// The format to use for serializing date time objects, by default, ISO 8601
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000041.html">Encoding</a>
</td>
<td>
/// The encoding for converting streams of bytes to strings
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_000000000000003D.html">ExcludedColumns</a>
</td>
<td>
/// Exclude these columns during serialization and deserialization
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000030.html">FieldDelimiter</a>
</td>
<td>
/// The character used to delimit individual fields in the CSV.
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_000000000000003E.html">ForceQualifierTypes</a>
</td>
<td>
/// A list of data types that require text qualifiers during serialization.
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000033.html">ForceQualifiers</a>
</td>
<td>
/// Set this value to true to enclose all fields in the text qualifier character.
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000036.html">HeaderRowIncluded</a>
</td>
<td>
/// The first line of the CSV file will include the names of each field.
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_000000000000003C.html">HeadersCaseSensitive</a>
</td>
<td>
/// Expect headers to be case sensitive during deserialization
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000039.html">IgnoreDimensionErrors</a>
</td>
<td>
/// Set this value to true to allow parsing for files where each row has a different number of fields
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_000000000000003F.html">IgnoreEmptyLineForDeserialization</a>
</td>
<td>
/// Some CSV files contain an empty line at the end. If you set this flag to true, deserialization will
/// not throw an error for empty lines and will instead ignore it.
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_000000000000003A.html">IgnoreHeaderErrors</a>
</td>
<td>
/// Set this value to true to ignore header errors when deserializing
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_000000000000003B.html">IgnoreReadOnlyProperties</a>
</td>
<td>
/// Set this flag to true to ignore read-only properties during serialization
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000032.html">LineSeparator</a>
</td>
<td>
/// The separator used to indicate the end of a line in the CSV file.
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000043.html">NestedArrayBehavior</a>
</td>
<td>
/// The behavior to use when serializing a column that is an array or enumerable type
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000044.html">NestedObjectBehavior</a>
</td>
<td>
/// The behavior to use when serializing a column that is a class
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000035.html">NullToken</a>
</td>
<td>
/// If AllowNull is set to true, this token will be used to represent NULL values.
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public property" title="Public property" src="msdn2019/pubproperty.png"></img>
</td>
<td>
<a href="topic_0000000000000031.html">TextQualifier</a>
</td>
<td>
/// The character used to enclose fields that contain the delimiter character.
///
</td>
</tr>
</table>
<a href="#mainBody">
Top
</a>
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">Methods</a></span>
<div>&nbsp;</div>
</div>
<div id="MethodsSection" class="section">
<table class="memberListTable">
<tr>
<th></th>
<th>
Name
</th>
<th>
Description
</th>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_0000000000000048.html">CloneWithNewDelimiter(char)</a>
</td>
<td>
/// Clone the existing settings, but with a different field delimiter.
///
/// Used for parsing of &quot;sep=&quot; lines so that the original object is immutable.
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_000000000000004A.html">GetForceQualifierTypes()</a>
</td>
<td>
/// Retrieve a hashset containing the list of types that require text qualifiers, or null if this
/// feature is not used in this settings definition
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public method" title="Public method" src="msdn2019/pubmethod.png"></img>
</td>
<td>
<a href="topic_0000000000000049.html">GetRiskyChars()</a>
</td>
<td>
/// Retrieve the list of risky characters according to this settings definition
///
</td>
</tr>
</table>
<a href="#mainBody">
Top
</a>
</div>
</div>
<!-- Classes -->
<!-- Classes End -->
<!-- Standard Modules -->
<!-- Standard Modules End -->
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">Fields</a></span>
<div>&nbsp;</div>
</div>
<div id="FieldsSection" class="section">
<table class="memberListTable">
<tr>
<th></th>
<th>
Name
</th>
<th>
Description
</th>
</tr>
<tr class="
">
<td>
<img alt="Public field" title="Public field" src="msdn2019/pubfield.png"></img>
<img alt="Static" title="Static" src="msdn2019/static.png"></img>
</td>
<td>
<a href="topic_0000000000000045.html">CSV</a>
</td>
<td>
/// Standard comma-separated value (CSV) file settings
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public field" title="Public field" src="msdn2019/pubfield.png"></img>
<img alt="Static" title="Static" src="msdn2019/static.png"></img>
</td>
<td>
<a href="topic_0000000000000046.html">CSV_PERMIT_NULL</a>
</td>
<td>
/// Standard comma-separated value (CSV) file settings that permit rendering of NULL values
///
</td>
</tr>
<tr class="
">
<td>
<img alt="Public field" title="Public field" src="msdn2019/pubfield.png"></img>
<img alt="Static" title="Static" src="msdn2019/static.png"></img>
</td>
<td>
<a href="topic_0000000000000047.html">TSV</a>
</td>
<td>
/// Standard tab-separated value (TSV) file settings
///
</td>
</tr>
</table>
<a href="#mainBody">
Top
</a>
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">Applies to</a></span>
<div>&nbsp;</div>
</div>
<div id="frameworksSection" class="section">
<h4 class="subHeading">.NET Framework</h4>Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8<br />
</div>
</div>
<div class="section_container">
<div class="section_heading">
<span><a href="javascript:void(0)" title="Collapse" onclick="toggleSection(this);">See Also</a></span>
<div>&nbsp;</div>
</div>
<div id="seeAlsoSection" class="section">
<div>
<a href="topic_0000000000000000.html">CSVNET Namespace</a><br />
</div>
</div>
</div>
</div>
<div id="internal-toc-area">
<div id="internal-toc-container" class="stickthis">
<h3 id="internal-toc-heading">In this article</h3>
<span id="internal-toc-definition-localized-text">Definition</span>
</div>
</div>
</div>
<div id="footer">
<div id="footer-container">
<p>Generated with <a target="_top" href="http://www.helixoft.com/vsdocman/overview.html">VSdocman</a></p>
</div>
</div>
</div>
</body>
</html>