Suresh:

An arraylist using dotnetfactory may solve your problem.  The following URL
has an excellent explanation and example.

http://www.learnqtp.com/dotnetfactory-qtp-part7-arraylist/

hth,


Parke

On Thu, Mar 19, 2009 at 2:48 PM, ooth suresh <[email protected]> wrote:

> Hi
>
> I have a scenario like the one mentioned below.
>
> 1. I have a dynamic array say textlines()
> 2. I am reading a txt file content, line by line and need to store it in
> the above mentioned dynamic array
> 3. i need to calculate the total number of lines in the file
>
> To accomplish this i have coded like this, but which doesnt work??!!!!
>
>
> Dim tempfile, textlines(),i,fso
>
>  Const ForReading = "1"
>
> i = 0
>
> Set fso = CreateObject("Scripting.FileSystemObject")
> Set tempfile= fso.OpenTextFile(  "C:\file.txt", ForReading )
>
> Do Until tempfile.AtEndofStream
>       textlines(i) = tempfile.ReadLine()
>       i = i + 1
>
>  Loop
>
>  msgbox(i)
>
> Please help me with the solution. Also how to return two values("i" and
> textline()), if this is to be done in a function????
>
> Waiting for the reply
> Regards
> Suresh S
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to