title: How to do user input in a dictionary in C#?
body: <p>I want to make a dictionary which takes user input with space. The dictionary takes input a string and integer.</p>
  
  <p>I tried by giving input by array but don't know how to do user input in two arrays simultaneously with space.</p>
  
  <pre><code>Dictionary&lt;string, int&gt; Directory = new Dictionary&lt;string, int&gt;();
  int n = int.Parse(Console.ReadLine());
  string[] name = new string[n];
  int[] phone_no = new int[n];
  for (int i = 0; i &lt; n; i++)
  }
      name[i] = Console.ReadLine();
      phone_no[i] = int.Parse(Console.ReadLine());
  }
  for (int i = 0; i &lt; n; i++)
  {
      Directory.Add(name[i], phone_no[i]);
  }
  </code></pre>
  
  <p>I want help for doing user input like:</p>
  
  <p>1.Sam 12345678</p>
  
  <p>2.Harry 25468789</p>