title: Add element in double[,] array
body: <p>I try to add element to <code>double[,]</code> array. But there was occured some issues with it. I must save coordinates in JSON. It looks like this:</p>
  
  <pre><code>{
    "Polyline": [
    {
      "name": "Line1",
      "towers": [
         [13.32, 33.12],
         [3.7, 565.5432],
         [867.762, 653.1676],
              ...
      ]
    ]
    }
  }
  </code></pre>
  
  <p>and here is the code:</p>
  
  <pre><code>public double[,] GetTowersById(List&lt;Towers&gt; towers)
      {
          double[,] towersCoords = new double[towers.Count-1, towers.Count-1];
  
          using (ZadiagDBEntities context = new ZadiagDBEntities())
          {
              //List&lt;Towers&gt; tower = new List&lt;Towers&gt;();
              foreach (var item in towers)
              {
                  int counter = 0;
                  var tower = context.Towers.First(t =&gt; t.ID == item.ID);     // it is an object like Tower tower = new Tower(); with properties tower.Lat and tower.Long (their type is double)
                  object currentElem = new double[]{ Convert.ToDouble(tower.Lat), Convert.ToDouble(tower.Long) };
                  towersCoords.SetValue(currentElem, counter, counter);
                  counter++;
              }
              //tower = context.Towers.Where(t =&gt; t.ID == towers[i].ID).ToList();
  
  
              }
  </code></pre>
  
  <p>The error message:</p>
  
  <blockquote>
    <p>Array is not single dimensional</p>
  </blockquote>