Table of Contents

Property NewLine

Namespace
DocWright.Formats.Text
Assembly
DocWright.Formats.Text.dll

NewLine

Gets or sets the line ending. Defaults to "\r\n".

public string NewLine { get; set; }

Property Value

string

Remarks

A fixed default rather than Environment.NewLine: the same document must produce the same bytes on every platform and every target framework, which is the determinism rule §3 of the global constraints states, and a platform-dependent default would break it silently on the one platform CI does not run.

Exceptions

ArgumentNullException

The value is null.

ArgumentException

The value is not "\n", "\r\n" or "\r".