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
6+2 =