Click here to Skip to main content
16,004,969 members
Home / Discussions / C#
   

C#

 
AnswerRe: Dictionary where the key is a combination of values? Pin
Martin#18-Nov-07 21:56
Martin#18-Nov-07 21:56 
GeneralRe: Dictionary where the key is a combination of values? Pin
Rune Baess19-Nov-07 0:06
Rune Baess19-Nov-07 0:06 
AnswerRe: Dictionary where the key is a combination of values? Pin
Ennis Ray Lynch, Jr.19-Nov-07 4:08
Ennis Ray Lynch, Jr.19-Nov-07 4:08 
GeneralRe: Dictionary where the key is a combination of values? Pin
Rune Baess19-Nov-07 5:36
Rune Baess19-Nov-07 5:36 
AnswerRe: Dictionary where the key is a combination of values? Pin
PIEBALDconsult19-Nov-07 13:47
mvePIEBALDconsult19-Nov-07 13:47 
GeneralRe: Dictionary where the key is a combination of values? Pin
Rune Baess19-Nov-07 20:31
Rune Baess19-Nov-07 20:31 
GeneralRe: Dictionary where the key is a combination of values? Pin
PIEBALDconsult20-Nov-07 5:54
mvePIEBALDconsult20-Nov-07 5:54 
AnswerRe: Dictionary where the key is a combination of values? Pin
PIEBALDconsult20-Nov-07 17:44
mvePIEBALDconsult20-Nov-07 17:44 
I like a good programming exercise. What I've been concentrating on is the "max flexibility" part, but with a lack of type safety Frown | :( I don't see how both can be achieved.

This is just a little test program that uses the class I'm working on.

C#
namespace Test
{
    class Test
    {
        [System.STAThreadAttribute]
        static void
        Main
        (
            string[] args
        )
        {
            PIEBALD.Types.Hierarchary store = new PIEBALD.Types.Hierarchary
            (
                typeof(int)
            ,
                typeof(int)
            ,
                typeof(string)
            ) ;
 
            store [ 1234 , 1 , "Property1" ] = "1234 1 1" ;
            store [ 1234 , 1 , "Property2" ] = "1234 1 2" ;
 
            store [ 1234 , 2 , "Property1" ] = "1234 2 1" ;
            store [ 1234 , 2 , "Property2" ] = "1234 2 2" ;
 
            store [ 1237 , 1 , "Property1" ] = "1237 1 1" ;
            store [ 1237 , 1 , "Property2" ] = "1237 1 2" ;
 
            System.Console.WriteLine 
            ( "ProductId (key)   InventId (key)   Property1 (value)    Property2 (value)" ) ;
 
            foreach ( object k1 in store.Keys() )
            {
                foreach ( object k2 in store.Keys ( k1 ) )
                {
                    System.Console.WriteLine
                    (
                        "{0,-17} {1,-16} {2,-20} {3,-20}"
                    ,
                        k1
                    ,
                        k2
                    ,
                        store [ k1 , k2 , "Property1" ]
                    ,
                        store [ k1 , k2 , "Property2" ]
                    ) ;
                }
            }
 
            return ;
        }
    }
}

GeneralRe: Dictionary where the key is a combination of values? Pin
Rune Baess21-Nov-07 10:15
Rune Baess21-Nov-07 10:15 
GeneralRe: Dictionary where the key is a combination of values? Pin
PIEBALDconsult21-Nov-07 12:11
mvePIEBALDconsult21-Nov-07 12:11 
GeneralRe: Dictionary where the key is a combination of values? Pin
PIEBALDconsult23-Nov-07 7:25
mvePIEBALDconsult23-Nov-07 7:25 
QuestionHow do I "test" an Exception type? Pin
JoeRip18-Nov-07 21:37
JoeRip18-Nov-07 21:37 
AnswerRe: How do I "test" an Exception type? Pin
laserbaronen18-Nov-07 21:39
laserbaronen18-Nov-07 21:39 
GeneralRe: How do I "test" an Exception type? Pin
JoeRip18-Nov-07 21:42
JoeRip18-Nov-07 21:42 
GeneralRe: How do I "test" an Exception type? Pin
JoeRip18-Nov-07 21:50
JoeRip18-Nov-07 21:50 
GeneralRe: How do I "test" an Exception type? Pin
Martin#18-Nov-07 21:53
Martin#18-Nov-07 21:53 
GeneralRe: How do I "test" an Exception type? Pin
JoeRip18-Nov-07 22:01
JoeRip18-Nov-07 22:01 
GeneralRe: How do I "test" an Exception type? Pin
Martin#18-Nov-07 22:06
Martin#18-Nov-07 22:06 
GeneralRe: How do I "test" an Exception type? Pin
PIEBALDconsult19-Nov-07 4:23
mvePIEBALDconsult19-Nov-07 4:23 
GeneralRe: How do I "test" an Exception type? Pin
JoeRip18-Nov-07 21:58
JoeRip18-Nov-07 21:58 
GeneralRe: How do I "test" an Exception type? Pin
J4amieC18-Nov-07 22:33
J4amieC18-Nov-07 22:33 
GeneralRe: How do I "test" an Exception type? Pin
JoeRip18-Nov-07 22:35
JoeRip18-Nov-07 22:35 
Questioni dont want edit in combo box in window application Pin
Rajeshwar Code- Developer18-Nov-07 21:10
Rajeshwar Code- Developer18-Nov-07 21:10 
AnswerRe: i dont want edit in combo box in window application Pin
Giorgi Dalakishvili18-Nov-07 21:18
mentorGiorgi Dalakishvili18-Nov-07 21:18 
GeneralRe: i dont want edit in combo box in window application Pin
Rajeshwar Code- Developer19-Nov-07 0:42
Rajeshwar Code- Developer19-Nov-07 0:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.