Can a function return a dictionary object?

Answers were Sorted based on User's Feedback



Can a function return a dictionary object?..

Answer / uday kumar _ anem

Yes.

Functions can return a dictonary object.

Dim dicObj
Set dicObj = CreateObject("Scripting.Dictionary")

Set obj=getname
MsgBox(obj.item("name"))


Public Function getname()
dicObj.add "name","Uday Kumar"
Set getname=dicObj
End function

Is This Answer Correct ?    17 Yes 3 No

Can a function return a dictionary object?..

Answer / parag barjatiya

Public Sub GetValue()
Set obj = getname
MsgBox (obj.Item("name"))
End Sub

Public Function getname()
Dim dicObj
Set dicObj = CreateObject("Scripting.Dictionary")
dicObj.Add "name", "Uday Kumar"
Set getname = dicObj
End Function

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More QTP Interview Questions

What is post recovery scenario?

0 Answers  


How many types of Parameters are available in QTP? and Pls Explain with example.

4 Answers   LG Soft,


how can i count the number of links???

2 Answers  


hi.what is exactly mean by real time frame work? every institute teach Framework is nothing but having 6 to 7 folders..and save repositories functions keywords and scripts? this is enough or not? can we beleive?

1 Answers  


In a yahoo web Application there are 65 links.one day it will opens 50 links and another day it will open 55 links.In this scenerio write Descriptive programing for Automation?....Pls write the code for this scenerio.

1 Answers   College School Exams Tests, UHG,


Difference between image checkpoint and bitmap checkpoint

4 Answers  


How to verify the Cursor focus of a certain field?

1 Answers  


i have batch scripts in qtp and i want to update the status like pass/fail in excel sheet after excecuting the every script in batch.how to write the script for this?

1 Answers   IBM,


In the QTP the snap shots obtained during the recording time will appear in the active screen, if we have to use the snapshots from where we have to access. in which memory location of QTP they will be stored?

1 Answers  


what kind of frame work you used in your last project?

0 Answers   Deloitte,


what difference between client and server applications exatly?

1 Answers   Honeywell,


What is the difference between Call to Action and Copy Action?

2 Answers   Satyam,


Categories