title: iterate two dimensional array only bring up one character of the end word
body: <p>I have been writing some code to popular a word document through the content controls with XML mapping using open xml format sdk 2.0. I have an two dimensional array which I want to loop through and place each par of the information on a new line on the document;</p>
  
  <pre><code>public static string[,] ArrSkills = new string[,] {{"Live", "The Dream", "More"}, {"And", "Even", "More"} };
  </code></pre>
  
  <p>I have two functions one which maps the XML and the other with is a list of the xml to loop through</p>
  
  <pre><code> #region XMLElements
      public static string XMLName = "&lt;Name&gt;" + ArrPName[0] + "&lt;/Name&gt;";
      public static string XMLAddress = "&lt;Address&gt;"+ AArrddress[0] +"&lt;/Address&gt;";
      public static string XMLHomeNumber = "&lt;HomeNumber&gt;"+ ArrHomePhoneNunber[0] +"&lt;/HomeNumber&gt;";
      public static string XMLMobileNumber = "&lt;MobileNumber&gt;"+ ArrMobileNumber[0] +"&lt;/MobileNumber&gt;";
      public static string XMLEmail = "&lt;Email&gt;"+ ArrEmail[0] +"&lt;/Email&gt;";
      public static string XMLDriversLicence = "&lt;DriversLicence&gt;"+ ArrDriversLicence[0] +"&lt;/DriversLicence&gt;";
      public static string XMLCarOwner = "&lt;CarOwner&gt;"+ ArrCarOwner[0] +"&lt;/CarOwner&gt;";
      public static string XMLPStatement = "&lt;PStatement&gt;"+ ArrPStatement[0] +"&lt;/PStatement&gt;";
      public static string XMLskills = "&lt;SkillsAndQualities&gt;"+ XMLskills +"&lt;/SkillsAndQualities&gt;";
      public static string XMLEd = "&lt;ed&gt; &lt;/ed&gt;";
      public static string XMLWork = "&lt;WorkEx&gt;"+ ArrWork[0] +"&lt;/WorkEx&gt;";
      public static string XMLInterest = "&lt;InterestAndHobbies&gt;"+ ArrInterest[0] +"&lt;/InterestAndHobbies&gt;";
      public static string XMLRef = "&lt;Ref&gt;" + ArrReferences[0] + "&lt;/Ref&gt;";
      #endregion
  
      public static void WriteWordFile(string TemplatePath)
      {
          using (WordprocessingDocument WPDoc = WordprocessingDocument.Open(TemplatePath, true))
          {
  
              SortElements(TemplatePath);
  
              string XML = "&lt;root&gt;" +
                           XMLName +
                           XMLAddress +
                           XMLHomeNumber +
                           XMLMobileNumber +
                           XMLEmail +
                           XMLDriversLicence +
                           XMLCarOwner +
                           XMLPStatement +
                           XMLskills +
                           XMLEd +
                           XMLWork +
                           XMLInterest +
                           XMLRef +
                           "&lt;/root&gt;";
  
              MainDocumentPart MainDoc = WPDoc.MainDocumentPart;
              MainDoc.DeleteParts&lt;CustomXmlPart&gt;(MainDoc.CustomXmlParts);
  
              CustomXmlPart CustomXML = MainDoc.AddCustomXmlPart(CustomXmlPartType.CustomXml);
  
              using (StreamWriter SW = new StreamWriter(CustomXML.GetStream()))
              {
                  SW.Write(XML.ToString());
              }
          }
      }
  
      public static List&lt;string&gt; SortElements(string TemplatePath)
      {
          List&lt;string&gt; ElementsList = new List&lt;string&gt;();
          ElementsList.Add(XMLName);
          ElementsList.Add(XMLAddress);
          ElementsList.Add(XMLHomeNumber);
          ElementsList.Add(XMLMobileNumber);
          ElementsList.Add(XMLEmail);
          ElementsList.Add(XMLDriversLicence);
          ElementsList.Add(XMLCarOwner);
          ElementsList.Add(XMLPStatement);
          ElementsList.Add(XMLskills);
          ElementsList.Add(XMLEd);
          ElementsList.Add(XMLWork);
          ElementsList.Add(XMLInterest);
          ElementsList.Add(XMLRef);
  
          foreach (var FindItem in ElementsList)
          {
              if (FindItem.Equals(XMLskills))
              {
                  for (int i = 0; i &lt; ArrSkills.GetLength(0); i++)
                  {
                      string NewLine = ArrSkills[i, 0];
  
                      NewLine = XMLskills;
                  }
              }
              else if (FindItem.Equals(XMLWork))
              {
  
              }
          }
  
          return ElementsList;
      }
  </code></pre>
  
  <p>The loop checks the list of xml items and when it gets to match "Skills" it then loops through the array within the if statement.</p>
  
  <p>The issue I am finding when I am iterate the array it is coming up with the end character of first part of the array "More" and print just "e" out into the document. I was just wondering who would you loop through the array and get all the information from it onto the word document</p>