How to convert a Dictionary<int, double> to an array?

  • Thread starter Thread starter amir
  • Start date Start date
A

amir

I am trying to convert a Dictionary into an array so that I can compare
values and compare keys individually.

I am looking for a solution like array[array] i.e array of array.
 
amir said:
I am trying to convert a Dictionary into an array so that I can compare
values and compare keys individually.

I am looking for a solution like array[array] i.e array of array.

- convert dic.Keys to int[]
- convert dic.Values to double[]
- store both arrays in object[]

I doubt that it is a good idea to convert to that format.

Arne
 
I did that already but thought, may be there is a smarter way than that so
that I can compare values easily in the int[]

Arne Vajhøj said:
amir said:
I am trying to convert a Dictionary into an array so that I can compare
values and compare keys individually.

I am looking for a solution like array[array] i.e array of array.

- convert dic.Keys to int[]
- convert dic.Values to double[]
- store both arrays in object[]

I doubt that it is a good idea to convert to that format.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top