• Michael R (unregistered)

    ArrayOfKeyValueOfintintKeyValueOfintint[1]=1

  • (nodebb)

    .net 2.0 (2005):

    KeyValuePair<int,int>[]
    
  • Steven J Pemberton (unregistered)

    I once had to do this when dealing with a third-party library. I needed to pass a Map, and in theory that would've worked, but the library added a lot of cruft that I would've had to filter out at the other end. I thought there was probably a way to do it, but I couldn't be bothered to figure it out, so I just flattened the Map to an array, alternating between keys and values.

  • (nodebb) in reply to MaxiTB
    Dictionary<int,int>
    
  • Tinkle (unregistered)

    {Evil Grin}

    (int Key, int Value)[]

    On a serious note - the idea of naming the type is not bad. Just the name used. It probably should have been something like CellData, or whatever is is storing.

  • (nodebb)

    Is this AI?

  • (nodebb) in reply to colejohnson66

    Not the same; dictionary doesn't allow duplicate keys ;-)

    Addendum 2025-01-02 18:26: Plus you cannot index it by position and the sort order will also be messed up.

  • (nodebb) in reply to MaxiTB

    KeyValuePair<int,int>[]

    But then DRY so you'd want to type alias it, and that alias would be ArrayOfKeyValuePairOfintint. And then, to not forget the thing is actually an array, you'd not put the array part into the alias. Just a brilliant naming scheme! CQFD.

  • (nodebb)

    ArrayOfKeyValueOfintintKeyValueOfIntint

    Finally a reason to switch to 32:9 monitors.

Leave a comment on “intint”

Log In or post as a guest

Replying to comment #:

« Return to Article