Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Dictionary of array in C#

class SomeClass
{
    Dictionary<string, int[]> myDictionary = new Dictionary<string, int[]>()
    {
        {"length", new int[] {1,1} },
        {"width", new int[] {1,1} },
    };

    public void SomeMethod()
    {
        Dictionary<string, int[]> myDictionary2;
        myDictionary2 = new Dictionary<string, int[]>()
        {
            {"length", new int[] {1,1} },
            {"width", new int[] {1,1} },
        };
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Dictionary #array
ADD COMMENT
Topic
Name
2+4 =