ZennoLab Assemblies Documentation
FileGetLine(String,String,Boolean,String,String,Boolean) Method
See Also  Example Send Feedback
ZennoLab.Macros Assembly > ZennoLab.Macros Namespace > FileSystem Class > FileGetLine Method : FileGetLine(String,String,Boolean,String,String,Boolean) Method
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.

regex

Type: System.String

Regular expression to parse the line.

numberOfMatch

Type: System.String

Number of match after parsing.

removeEmptyFile

Type: System.Boolean

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

Glossary Item Box

Gets string from the file

Syntax

C# 
public static string FileGetLine( 
   string path,
   string numberOfLine,
   bool removeLine,
   string regex,
   string numberOfMatch,
   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.

regex

Type: System.String

Regular expression to parse the line.

numberOfMatch

Type: System.String

Number of match after parsing.

removeEmptyFile

Type: System.Boolean

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

Return Value

Type: System.String

String after spliting and sampling.

Example

The following example shows call the FileGetLine method.
C#Copy Code
string path = {pathToFile};
string numberOfLine = {numberOfLine};
bool removeLine = true;
string regex = {regularExpression};
string numberOfMatch = {numberOfMatch};
string result = FileSystem.FileGetLine(path, numberOfLine, removeLine, regex, numberOfMatch);
PHPCopy Code
$path = {pathToFile};
$numberOfLine = {numberOfLine};
$removeLine = true;
$regex = {regularExpression};
$numberOfMatch = {numberOfMatch};
$result = FileSystem::FileGetLine($path, $numberOfLine, $removeLine, $regex, $numberOfMatch);

Requirements

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

See Also

© 2013 All Rights Reserved.