C# List<> Add lists to dictionary

后端 未结 2 475
有刺的猬
有刺的猬 2021-01-29 06:13
        Dictionary> SetPiese = new Dictionary>();

        char[] litere = \"ABCDEFGHIJLMNOPRSTUVXZ\".ToC         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-29 06:34

    I guess this works:

    Dictionary> SetPiese = new Dictionary>();
    List SetA = GenerareSetLitere("A", 1, 11);
    List SetB = GenerareSetLitere("B", 9, 2);
    List SetC = GenerareSetLitere("C", 1, 5);
    SetPiese.Add("A", SetA);
    SetPiese.Add("B", SetB);
    SetPiese.Add("C", SetC);
    

    I'm not sure because you haven't mentioned the key of your dictionary.

提交回复
热议问题