title: Getting Exception of type 'System.OutOfMemoryException' was thrown
body: <pre><code>private static void InsertClinicalItemMaster(XElement elecim)
      {
          //Insert To DataBase Logic
          try
          {
              String strStatus = "";
              SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=Test;User ID=sa;Password=saadmin");
              SqlCommand cmd = new SqlCommand("SP_Insert_ClinicalItemMaster", con);
              cmd.CommandType = CommandType.StoredProcedure;
               cmd.Parameters.Add("@xmlData", SqlDbType.Xml).Value = Convert.ToString(elecim);
              cmd.Parameters.Add("@retValue", SqlDbType.NVarChar).Value = strStatus;
              con.Open();
              cmd.ExecuteNonQuery();
              con.Close();
          }
          catch (Exception ex)
          {
              throw ex;
          }
      }
  </code></pre>
  
  <p>When the "cmd.ExecuteNonQuery();" executes then I am getting above "OutOfMemoryException" . I assume that the problem with Converting XElement to String. </p>