Hi,
I have a dictionary variable of type (string ,integer)
Example: dict(string,int)= {{“Major”,2},{“Minor”,1}}
I want assign key=value like below sample
Example output
Major=2
Minor=1
How can we assign key=value…?
Hi,
I have a dictionary variable of type (string ,integer)
Example: dict(string,int)= {{“Major”,2},{“Minor”,1}}
I want assign key=value like below sample
Example output
Major=2
Minor=1
How can we assign key=value…?
Have a look here for working with Dictionaries
we can swap by the following
dict1| Dictionary(Of string,int32)- {{“Major”,2},{“Minor”,1}}
Assign Activity:
dictSwapped | Dictionary(Of int32, String) =
dict1.ToDictionary(Function (x) x.Value, Function (x) x.Key)
I don’t required to be swap…
I want
major=2
Minor=1
And so on…
see the shared link it is sharing all needed info with you like
myDict = new Dictionary(Of String, int32)From {{"Major",2},{"Minor",1}}
Hey You can use the below method,
for each item in dictonary ->(ForEach activity)
String.Format(“{0} = {1}”,item.Key,item.Value)
I want to make key as variable … and value to be assigned to that variable as shown in below.but it’s giving an error.please guide me
Hey @yashashwini2322
Try below screenshot
maybe you are looking for this:
YourDictVar(YourKeyStringVar) = yourValue
Yes… correct
Dictionary key as variable = dictionaryvalue as value
Assign activity: dict(“Major”) = 2
Assign activity dict(“Minor”) = 1
Then to retrieve the values you just use dict(“Major”) and dict(“Minor”)
If you’re trying to type them, display them in a Log Message etc then you use dict(“Major”).ToString etc