UtilTextFilesReplaceLine(String, String, Int32, IEnumerableString, TextDirection, Encoding) Method
Replaces the specified line number in the source textfile with the given text-lines,
then writes the result in the target textfile.
Namespace: DevCase.Core.DataProcessing.TextFilesAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void ReplaceLine(
string sourceFilepath,
string targetFilepath,
int lineNumber,
IEnumerable<string> textCol,
TextDirection textDirection,
Encoding enc = null
)
Public Shared Sub ReplaceLine (
sourceFilepath As String,
targetFilepath As String,
lineNumber As Integer,
textCol As IEnumerable(Of String),
textDirection As TextDirection,
Optional enc As Encoding = Nothing
)
Dim sourceFilepath As String
Dim targetFilepath As String
Dim lineNumber As Integer
Dim textCol As IEnumerable(Of String)
Dim textDirection As TextDirection
Dim enc As Encoding
UtilTextFiles.ReplaceLine(sourceFilepath,
targetFilepath, lineNumber, textCol,
textDirection, enc)
public:
static void ReplaceLine(
String^ sourceFilepath,
String^ targetFilepath,
int lineNumber,
IEnumerable<String^>^ textCol,
TextDirection textDirection,
Encoding^ enc = nullptr
)
static member ReplaceLine :
sourceFilepath : string *
targetFilepath : string *
lineNumber : int *
textCol : IEnumerable<string> *
textDirection : TextDirection *
?enc : Encoding
(* Defaults:
let _enc = defaultArg enc null
*)
-> unit
No code example is currently available or this language may not be supported.
Parameters
- sourceFilepath String
-
The source textfile path.
- targetFilepath String
-
The target textfile path.
- lineNumber Int32
-
The index of the line to replace.
- textCol IEnumerableString
-
The text-lines to replace.
- textDirection TextDirection
-
The text direction.
- enc Encoding (Optional)
-
The file encoding used to read/write the textfile.
This is a code example.
No code example is currently available or this language may not be supported.
ReplaceLine("C:\old file.txt", "C:\new file.txt", 5, "Text", UtilTextFiles.TextDirection.Top, Encoding.Default)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.