ZennoLab Assemblies Documentation
FileGetLines(String,String,Boolean,Boolean) Method
Example 

Type: System.String

Path to the source file.

Type: System.String

The number of the line.

Type: System.Boolean

true if remove the used line; otherwise, false.

Type: System.Boolean

true if need to remove empty source file after sampling; otherwise, false.

Gets strings from the file
Syntax
public static string[] FileGetLines( 
   string path,
   string numberOfLine,
   bool removeLine,
   bool removeEmptyFile
)

Parameters

path

Type: System.String

Path to the source file.

numberOfLine

Type: System.String

The number of the line.

removeLine

Type: System.Boolean

true if remove the used line; otherwise, false.

removeEmptyFile

Type: System.Boolean

true if need to remove empty source file after sampling; otherwise, false.

Return Value

Type: System.String

Strings after spliting and sampling.

Example
The following example shows call the FileGetLine method.
string path = {pathToFile};
string numberOfLine = {numberOfLine};
bool removeLine = true;
string[] result = FileSystem.FileGetLines(path, numberOfLine, removeLine);
$path = {pathToFile};
$numberOfLine = {numberOfLine};
$removeLine = true;
$result = FileSystem::FileGetLines($path, $numberOfLine, $removeLine);
Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven

See Also

Reference

FileSystem Class
FileSystem Members
Overload List

Send Feedback