How to convert dictionary to array

Hello Guys, I want to know how can I pass all the information of a dictionary into array. Tks in advance

@sergio85

Can you please tell your expected result with an example.

Regards,
Mahesh

Hi @sergio85,

Use the below code to get all the values into array
dict.Values.ToArray()

If you want both key and value into array use below code

dict.ToArray()

Regards,
Arivu

4 Likes

Thank you so much. It worked very well

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.