UtilTextFilesReplaceLine(String, Int32, String, TextDirection, Encoding) Method
Replaces the specified line number in the source textfile with the given text-line.
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 IEnumerable<string> ReplaceLine(
string sourceFilepath,
int lineNumber,
string text,
TextDirection textDirection,
Encoding enc = null
)
Public Shared Function ReplaceLine (
sourceFilepath As String,
lineNumber As Integer,
text As String,
textDirection As TextDirection,
Optional enc As Encoding = Nothing
) As IEnumerable(Of String)
Dim sourceFilepath As String
Dim lineNumber As Integer
Dim text As String
Dim textDirection As TextDirection
Dim enc As Encoding
Dim returnValue As IEnumerable(Of String)
returnValue = UtilTextFiles.ReplaceLine(sourceFilepath,
lineNumber, text, textDirection,
enc)
public:
static IEnumerable<String^>^ ReplaceLine(
String^ sourceFilepath,
int lineNumber,
String^ text,
TextDirection textDirection,
Encoding^ enc = nullptr
)
static member ReplaceLine :
sourceFilepath : string *
lineNumber : int *
text : string *
textDirection : TextDirection *
?enc : Encoding
(* Defaults:
let _enc = defaultArg enc null
*)
-> IEnumerable<string>
No code example is currently available or this language may not be supported.
- sourceFilepath String
-
The source textfile path.
- lineNumber Int32
-
The index of the line to replace.
- text String
-
The text-line to replace.
- textDirection TextDirection
-
The text direction.
- enc Encoding (Optional)
-
The file encoding used to read the textfile.
IEnumerableString
An
IEnumerableT that contains the textfile lines with the replaced line.
This is a code example.
No code example is currently available or this language may not be supported.
Dim lines As IEnumerable(Of String) = ReplaceLine("C:\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.