UtilTextFilesInsertLines(String, Int32, IEnumerableString, TextDirection, Encoding) Method
Inserts the specified text-lines in the given line number of the source 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 IEnumerable<string> InsertLines(
string sourceFilepath,
int lineNumber,
IEnumerable<string> textCol,
TextDirection textDirection,
Encoding enc = null
)
Public Shared Function InsertLines (
sourceFilepath As String,
lineNumber As Integer,
textCol As IEnumerable(Of String),
textDirection As TextDirection,
Optional enc As Encoding = Nothing
) As IEnumerable(Of String)
Dim sourceFilepath As String
Dim lineNumber As Integer
Dim textCol As IEnumerable(Of String)
Dim textDirection As TextDirection
Dim enc As Encoding
Dim returnValue As IEnumerable(Of String)
returnValue = UtilTextFiles.InsertLines(sourceFilepath,
lineNumber, textCol, textDirection,
enc)
public:
static IEnumerable<String^>^ InsertLines(
String^ sourceFilepath,
int lineNumber,
IEnumerable<String^>^ textCol,
TextDirection textDirection,
Encoding^ enc = nullptr
)
static member InsertLines :
sourceFilepath : string *
lineNumber : int *
textCol : IEnumerable<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 start index of the line to insert.
- textCol IEnumerableString
-
The text-line to insert.
- 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 inserted lines.
This is a code example.
No code example is currently available or this language may not be supported.
Dim lines As IEnumerable(Of String) = InsertLines("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.
ArgumentOutOfRangeException
|
lineNumber
|
InvalidEnumArgumentException
|
textDirection
|