title: Add .mpp file to list <>
body: <p>I am working with .mpp files ... the first thing I do is read the file with an .mpp extension and that is going well for me, now what I am trying to do is add that file to a list but I can't get it.</p>
  
  <p>I am something new in this</p>
  
  <pre><code>private void Btn_Actualizar_Click(object sender, EventArgs e)
      {
          OpenFileDialog theDialog = new OpenFileDialog();
          if (theDialog.ShowDialog() == DialogResult.OK)
          {
              string fileName = theDialog.FileName.ToString();
              Load(fileName);
          }
      }
  
      public new string Load(string fileName)
      {
          MSProject.ApplicationClass app = null;
          string retVal = "";
          List&lt;Task&gt; tasks = new List&lt;Task&gt;();
  
          try
          {
              // execute the Microsoft Project Application
              app = new MSProject.ApplicationClass();
  
              // Do not display Microsoft Project
              app.Visible = false;
  
              // open the project file.
              if (app.FileOpen(fileName, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, MSProject.PjPoolOpen.pjPoolReadOnly, Type.Missing, Type.Missing, Type.Missing, Type.Missing))
              {
                  // go through all the open projects--there should only be one
                  foreach (MSProject.Project proj in app.Projects)
                  {
                      // go through all the tasks in the project
                      foreach (MSProject.Task task in proj.Tasks)
                      {
                          // add Microsoft Project Task to arraylist                          
                          //tasks.Add(new Task(task));
                          //tasks.Add(task);
                          List&lt;Task&gt; tasks1 = new List&lt;Task&gt;();
  
                      }
                  }
              }
              else
              {
                  retVal = "The MS Project file " + fileName + " could not be opened.";
              }
          }
  
          catch (Exception ex)
          {
              retVal = "Could not process the MS Project file " + fileName + "." + System.Environment.NewLine + ex.Message + System.Environment.NewLine + ex.StackTrace;
          }
  
          // close the application if is was opened.
          if (app != null)
          {
              app.Quit(MSProject.PjSaveType.pjDoNotSave);
          }
          return retVal;
      }
  </code></pre>
  
  <p>Where I want to add the result of reading the file is in this part of my code</p>
  
  <pre><code>foreach (MSProject.Task task in proj.Tasks)
                      {
                          // add Microsoft Project Task to arraylist                          
                          //tasks.Add(new Task(task));
                          //tasks.Add(task);
                          List&lt;Task&gt; tasks1 = new List&lt;Task&gt;();
  
                      }
  </code></pre>
  
  <p>Searching the web already tried several things but so far it has not worked for me and the list is always 0</p>