Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

[Dúvida] Dúvida sobre o sinal de maior

Por no trecho de código do exercício: ""Ana", new Dictionary<string, List>" Tem um sinal de maior duplo? A dúvida é só para conseguir entender a execucação do código

Seria por um motivo semelhante ao i++ por exemplo?
1 resposta
solução!

Saulo,

Se eu entendi a pergunta, é simples, está fechando primeiro o "int" (é tipo o "List") e depois 2x o "Dictionary<>"... está certo?

São DOIS dicionários! Um dentro do outro!!!

var notasAlunos = new Dictionary<string, Dictionary<string, List<int>>> {
    { "Ana", new Dictionary<string, List<int>> {
        { "C#", new List<int> { 8, 7, 6 } },
        { "Java", new List<int> { 7, 6, 5 } },
        { "Python", new List<int> { 9, 8, 8 } }
    }},
    { "Maria", new Dictionary<string, List<int>> {
        { "C#", new List<int> { 6, 5, 4 } },
        { "Java", new List<int> { 8, 7, 6 } },
        { "Python", new List<int> { 6, 10, 5 } }
    }},
    { "Luiza", new Dictionary<string, List<int>> {
        { "C#", new List<int> { 2, 3, 10 } },
        { "Java", new List<int> { 8, 8, 8 } },
        { "Python", new List<int> { 7, 7, 7 } }
    }}
};

Veja também:

===============================================================

C# - Comparando List com Dictionary

Hoje vamos comparar List com Dictionary na linguagem C#.

As listas e os dicionários pertencem às coleções de genéricas, usadas para armazenar coleções de dados.

https://macoratti.net/20/01/c_listdic1.htm

===============================================================

[]'s,

Fabio I.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software