Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confused in dot net arraylist
#1
Not Solved
Hi to All,

Today I am struck in below problem.I have a scenario similar to below as given ,I have to add number in dotnet arraylist and then sort it . When I execute the below code,it does not show me the desired result.Could anybody help me in this regard?

' **************Below is my code***********
Code:
Set Mylist=DotnetFactory.CreateInstance("System.Collections.ArrayList")

MyList.add("110714")
MyList.add("110790")
MyList.add("110914")
MyList.add("110915")
MyList.add("110933")
MyList.add("14403")
MyList.add("14618")
MyList.add("14619")
MyList.add("14620")
MyList.add("14925")
MyList.add("245534")
Mylist.sort



For q=0 To Mylist.count -1
print Mylist.item(cint(q))
Next

'********************************

'****Actual result is coming************
110714
110790
110914
110915
110933
14403
14618
14619
14620
14925
245534
'**********************************


'**************My expected result***********
14403
14618
14619
14620
14925
110714
110790
110914
110915
110933
245534
'***********************************
Reply
#2
Not Solved
Any reply on above thread?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  dot net application ch_rk2004 2 3,103 05-30-2016, 04:50 PM
Last Post: ch_rk2004
  Very confused on how to deal with run errors atester 0 1,436 03-07-2014, 04:03 PM
Last Post: atester
  Why do we need dot net framework as a pre-requisite for installing qtp? esatysh 1 4,399 08-29-2013, 02:24 PM
Last Post: Ankur
  QTP for application with Flex 3and dot net abhinay_v1 0 1,983 10-19-2011, 12:41 PM
Last Post: abhinay_v1

Forum Jump:


Users browsing this thread: 1 Guest(s)