title: How do i use a List which is inside a Dictionary
body: <p>let's say I want to make a program that takes as input: {personName} {food1} {food2} ... {foodN}.
  Then they should be stored in a Dictionary - The Key should be the {personName}, and the Value should be a list that stores all the food[n], that is in the input. Then i want to print them like this {personName} -&gt; {food1}, {food2}, {food3} ... {foodN}.</p>
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  
  namespace stack1
  {
      class Program
      {
          static void Main(string[] args)
          {
              string input = Console.ReadLine();  // George, Pizza, Burger
              Dictionary&lt;string, List&lt;string&gt;&gt; peopleFood = new Dictionary&lt;string, List&lt;string&gt;&gt;();
              while (input != &quot;stop&quot;)
              {
                  List&lt;string&gt; inputs = input.Split(&quot; &quot;).ToList(); // George, Pizza, Burger
                  peopleFood.Add(inputs[0], inputs[1], inputs[2]); // George, Pizza, Burger
                  input = Console.ReadLine(); //stop
              }
              Console.WriteLine(); // George -&gt; Pizza, Burger
          }
      }
  }
  
  </code></pre>
  <p>The .Add function is not working with 3 elements, and I don't know what else to use. The same goes for the printing process - I don't know how to print the output i want .</p>