Welcome, Guest. Please login or register.
Login with username, password and session length

 
Advanced search

18120 Posts in 4741 Topics- by 31743 Members - Latest Member: suuraj
 

Pages: [1]   Go Down
Print
0 Members and 1 Guest are viewing this topic.
Author Topic: DotNetFactory Constuctor Arguments    (Read 2079 times)
Nadav Rotenberg
User
*
Offline Offline

Posts: 16


« on: October 21, 2007, 12:31:24 PM »

First, Mazal-tov on the forum! (finally  Grin Tongue)

does anybody knows how can i create a new .Net instance with a multi-arguments constuctor?

for example, TimeSpan costuctor will take something like: new TimeSpan(Hours,Min,Seconds)

in QTP: CreateNewInstance("System.TimeSPan", , Hours[, Min, Seconds]

ofcourse it is not possible.. i tried to transfer VB array, .Net array.. nothing worked.

any idea of how it should be written?

Thank you,
Nadav Rotenberg

Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 623



« Reply #1 on: October 21, 2007, 12:49:02 PM »

Hi Nadav

i can give you the answer for you in seconds, i recommend you the chapter of My book
Scripting QTP "DotNetFactory" you will find there exactly what you're looking for, and you will suprise how much information you will find there.
the book is free, go to knowledge base -> Book Scripting QTP -> DotNetFactory.

pls. post your answer, just after you'll read a few lines of the chapter.
i'm courious
Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Nadav Rotenberg
User
*
Offline Offline

Posts: 16


« Reply #2 on: October 21, 2007, 12:52:24 PM »

so it is exacly as i wrote.. wierd it didn't work. i will try again.

well... thank you for your reply... next time i promise i will look first... Smiley
Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 623



« Reply #3 on: October 21, 2007, 12:59:33 PM »

by the way the System.TimeSpan contructors are the following

Code
GeSHi (qtp):
DotNetFactory.CreateInstance( "System.TimeSpan", , ticks )

DotNetFactory.CreateInstance( "System.TimeSpan", , hours, minutes, seconds )

DotNetFactory.CreateInstance( "System.TimeSpan", , days, hours, minutes, seconds )

DotNetFactory.CreateInstance( "System.TimeSpan", , days, hours, minutes, seconds, milliseconds )

 
Created by GeSHI 1.0.7.20
Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Pages: [1]   Go Up
Print
Jump to: