How to: Initialize a Dictionary with a Collection Initializer in C#

        Dictionary<int, string> map_i2sData = new Dictionary<int, string>
        {
            {156, "fred"},
            {176, "joe"},
            {196, "bill"},
            {106, "sam"},
        };

Do you mean like this (above)?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.