Multidimensional SortedList (C#)
Results 1 to 4 of 4

Thread: Multidimensional SortedList (C#)

Threaded View

  1. #1
    Senior Member
    Join Date
    Jan 2004
    Location
    Hawaii
    Posts
    351

    Multidimensional SortedList (C#)

    I am trying to create a 2-Dimensional SortedList in C#. I need to be able to look up a value using two keys, much like x,y coordinates.

    See the table below. I need to be able to input two keys (A,C) and have the value '3' returned. The keys are an enumeration I have and the values will be integers. The standard C# SortedList only supports one key to one value. How can I best do this in C#?

    Using this:
    Code:
    public enum letters
    {
        A=1,B=2,C=3
    }
    
      A B C
    A 1 2 3
    B 2 3 1
    C 3 1 2
    Last edited by AxessTerminated; November 4th, 2007 at 08:53 PM.
    Geek isn't just a four-letter word; it's a six-figure income.

Similar Threads

  1. Pointers to Multidimensional Arrays
    By shred2er in forum Programming Security
    Replies: 6
    Last Post: September 29th, 2003, 02:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides