Skip to content

TextFile Class ​

Definition ​

A text SourceFile.

c#
public sealed class TextFile : SourceFile, IEquatable<SourceFile>, IEqualityOperators<SourceFile, SourceFile, Boolean>

View source

Constructors ​

NameDescription
TextFile(FileInfo)Initialises a new instance of the TextFile class from a file on disk.
TextFile(String, Stream)Initialises a new instance of the TextFile class from a Stream containing the file.
TextFile(String, String)Initialises a new instance of the BinaryFile class from a string containing the file.

Properties ​

NameDescription
IsEmptyReturns true if the file is empty.
LinesThe individual lines in the file.
TextThe text of the file.

Methods ​

NameDescription
CreateEntireFilePosition()Creates a TextFilePosition from this TextFile that represents the whole file.
CreatePosition(Int32, Int32, Int32, Int32)Creates a TextFilePosition from this TextFile.