Table of Contents

Property LineTerminator

Namespace
Alternet.Editor.TextSource
Assembly
Alternet.Editor.v9.dll

LineTerminator

Gets or sets a string value that terminates line.

[Browsable(false)]
public virtual string LineTerminator { get; set; }

Property Value

string

Examples

Here is how to use a LineTerminator in the C# code:

using Alternet.Editor;
using Alternet.Editor.TextSource;

public partial class Form1 : Form
{
    private TextSource textSource;
    private void Form1_Load(object sender, EventArgs e)
    {
        var syntaxEdit = new SyntaxEdit(this.components);
        textSource = new TextSource(this.components);
        textSource.LoadFile("myfile.txt");

        textSource.LineTerminator = "\u000A";
        syntaxEdit.Source = this.textSource;
        textSource.SaveFile("myfile.txt");
    }
}

Here is how to use a LineTerminator in the Visual Basic code:

Imports Alternet.Editor
Imports Alternet.Editor.TextSource
Imports Microsoft.VisualBasic

Partial Public Class Form1
    Inherits Form

    Private textSource As TextSource

    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
        Dim syntaxEdit = New SyntaxEdit(Me.components)
        textSource = New TextSource(Me.components)
        textSource.LoadFile("myfile.txt")
        textSource.LineTerminator = vbLf
        syntaxEdit.Source = Me.textSource
        textSource.SaveFile("myfile.txt");
    End Sub
End Class

Remarks

LineTerminator specifies characters (such as CR and LF) that are automatically inserted into the text to separate text lines.