title: tilemap for windows phone in xna
body: <p>I'm tring to do tile map for windows phone using stream file this thing work to me in  game for windows but it's not working for windows phone i'm using xna  any one can help me please</p>
  
  <pre><code>public void LoadMapData(string name)
  {
      string path = "leveles/" + name + ".txt";
  
      // Width and height of our tile array
      int width = 0;
      int height = File.ReadLines(path).Count();
  
      StreamReader sReader = new StreamReader(path);
      string line = sReader.ReadLine();
      string[] tileNo = line.Split(',');
  
      width = tileNo.Count();
      mapLength = width * 40;
      // Creating a new instance of the tile Coin
      tileMap = new char[height, width];
      sReader.Close();
  
      // Re-initialising sReader
      sReader = new StreamReader(path);
  
      for (int y = 0; y &lt; height; y++)
      {
          line = sReader.ReadLine();
          tileNo = line.Split(',');
  
          for (int x = 0; x &lt; width; x++)
          {
              tileMap[y, x] = Convert.ToChar(tileNo[x]);
          }
      }
      sReader.Close();
  }
  </code></pre>