Suman: A sortedList is a dictionary and you must use Dotnetfactory to create one. With a sortedList dictionary, the keys are automatically sorted no matter the order that you enter the keys. I am at home but on Monday, I will post an example if you would like. As in a normal dictionary or hash, the keys must be unique. If your present values are not unique, make them unique by using the present value and concatenate the key to it. Make the concatenation the key.
An arrayList is an array which automatically sorts the array. No sort function is required as it is built in. As in any array, duplicates are fine. To use an arrayList, you must also use the DotNetfactory to create one. If you have additional questions, I will attempt to answer them. hth, Parke On Sat, Nov 9, 2013 at 7:43 AM, suman ch <[email protected]> wrote: > Hey Parke, > > Thanks for the reply. What I want to know is whether the keys added to the > dictionary object are stored in ascending order or not..? Just like a real > time Dictionary. Is there any direct way to sort an array of strings using > Dictionary object..? > > Will the arraylist work if there are duplicate elements in the array. > > Regards, > Suman Ch > > > On Wed, Nov 6, 2013 at 10:48 PM, Parke <[email protected]> wrote: > >> Suman: >> >> If you needed to sort keys then you could use a SortedList using >> Dotnetfactory. >> question 1: >> Is there any chance your values are unique? >> question 2: >> We could export your values into an ArrayList and sort. Do you still >> need the connection between the value and key? >> If yes, could try exporting value &":;"&key into an ArrayList and sort. >> The key would still be "associated" with the value and be pulled out by >> using the split function. >> >> >> hth, >> >> Parke >> >> >> -- >> -- >> 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 Groups >> "QTP - HP Quick Test Professional - Automated Software Testing" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > -- > 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 Groups > "QTP - HP Quick Test Professional - Automated Software Testing" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Parke Cell: 770-842-0121 -- -- 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 Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
