title: C# Get form names of project A from Project B
body: <p>I have two Projects in one solution, <code>project A</code> and <code>project B</code> (<code>using VS2010 Ultimate and C# windows application</code>).
  <code>Project B</code> acts as a user management application for <code>project A</code>.
  In <code>project B</code> i have a form that contains a <code>chekcedlistbox</code> control that will list all <code>project A</code> forms names and texts (this form will let system administrator to grant users the forms that are allowed to view/edit based on their security groups)
  this is my code:</p>
  
  <pre><code>   private void GetFormNames()
      {
          foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies())
          {
              foreach (Type t in a.GetTypes())
              {
                  if (t.BaseType == typeof(Form))
                  {
                      var emptyCtor = t.GetConstructor(Type.EmptyTypes);
                      if (emptyCtor != null)
                      {
                          var f = (Form)emptyCtor.Invoke(new object[] { });
                          string FormText = f.Text;
                          string FormName = f.Name;
                          checkedListBox1.Items.Add("" + FormText + "//" + FormName + "");
                      }
                  }
              }
  
          }
  
      }
  </code></pre>
  
  <p>the result i am getting is the form names of my current project (B) and Empty lines(//) and <code>Select Window//MdiWindowDialog</code>, <code>PrintPreview</code>.</p>