title: Reading a Text File Line by Line to Make a Map in XNA
body: <p>I want to read a text file in order to build map. </p>
  
  <p>For example I have this map:</p>
  
  <pre><code>0@0000000
  0@0000000
  0@0000000
  000000000
  000000000
  000000000
  000000000
  </code></pre>
  
  <p>I know I should use this:</p>
  
  <pre><code>StreamReader reader = new StreamReader(Application.StartupPath+@"/TestMap.MMAP");
  string line = reader.ReadToEnd();
  reader.Close();
  </code></pre>
  
  <p>Now, for example, I want read line 2 char "@". how can i do this?</p>
  
  <p>please help me.</p>
  
  <hr>
  
  <p><strong>Solved:</strong></p>
  
  <p>Thank you (@L.B AND @user861114), at last my problem was solved:</p>
  
  <pre><code>string[,] item = new string[9, 7];
  string[] line = File.ReadAllLines(Application.StartupPath + @"/TestMap.MMAP");
  for (int j = 0; j &lt; 7; j++)
  {
      for (int i = 0; i &lt; 9; i++)
      {
          item[i, j] = line[j].Substring(i, 1);
          Console.WriteLine(i + " " + j + "=" + item[i, j]);
      }
  }
  </code></pre>