I am using dictionaries with in the array. It is giving me an error. I am not finding out the correct syntax of it. Can anyone guide me on this.
thank you
thank you
What error is generated?
Maybe this will help you:
I am using dictionary in the Array.
The thing you mentioned here I already know that.
What is the error given?
Its a syntax error. Saying that compile error } is expected.
@nashrahkhan
it looks like in general you want to work with a dictionary of datatype: Int32, String
this can be initialized as below:
About the the usage of array maybe you can elaborate more on the scenario and what to achieve. Thanks
This is just the dictionary initialization.
Now create an array, in that array select dictionary with int32 and string. Dictionary2 , this will gonna appear. then give values to it. I am giving values but it is giving me compile time error of wrong syntax.
I hope you can understand now.
@nashrahkhan
not sure If I got you in all. It looks like you are searching on how to initialize an array of dictionaries. Maybe following can help:
Yes I am looking for this.
@nashrahkhan
have a look on the typeArguments from the For each Activity setting and change it to the corresponding datatype
Good try… the array “ArrayandDict” has 2 items of type Dictionary (of int32 , string) but both are null at the moment… let me do it
New Dictionary(Of Int32, String)(2) {} // declared array of length 0 to 2 that means it has 3 items
using assign activity all the dict0, dict1, dict2 are assigned to ArrayandDict items
First Foreach for the itration of array …see TypeArgument its Dictionary(of int32, string)
so each item will be a dictionary
inner loop to get value of each dictionary here the typeArgument is int32 because dictionary key is int32 it goes into key variable
Convert.ToString(item(key)) /// …
Here we will first give the values to the list and then use add to collection function to append that list in the first list.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.