UtilTextFilesReplaceLines(String, IEnumerableInt32, IEnumerableString, TextDirection, Encoding) Method

Replaces the specified line numbers in the source textfile with the given text-lines.

Definition

Namespace: DevCase.Core.DataProcessing.TextFiles
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static IEnumerable<string> ReplaceLines(
	string sourceFilepath,
	IEnumerable<int> lineNumbers,
	IEnumerable<string> textCol,
	TextDirection textDirection,
	Encoding enc = null
)

Parameters

sourceFilepath  String
The source textfile path.
lineNumbers  IEnumerableInt32
The index of the lines to replace.
textCol  IEnumerableString
The text-lines to replace.
textDirection  TextDirection
The text direction.
enc  Encoding  (Optional)
The file encoding used to read the textfile.

Return Value

IEnumerableString
An IEnumerableT that contains the textfile lines with the replaced lines.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Exceptions

ArgumentOutOfRangeException lineNumbers
InvalidEnumArgumentException textDirection

See Also