471,123 Members | 891 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,123 software developers and data experts.

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

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.
Mar 1 '08 #1
2 2313
amir wrote:
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

Mar 1 '08 #2
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" wrote:
amir wrote:
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

Mar 1 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ingo Nolden | last post: by
9 posts views Thread by richard_lavoie | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.