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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?YW1pcg==?=

    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.


  • =?UTF-8?B?QXJuZSBWYWpow7hq?=

    #2
    Re: How to convert a Dictionary&lt;i nt, double&gt; to an array?

    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

    Comment

    • =?Utf-8?B?YW1pcg==?=

      #3
      Re: How to convert a Dictionary&lt;i nt, double&gt; to an array?

      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
      >
      >

      Comment

      Working...