title: Show a new form when click a button
body: <p>I am new in c#. I am trying to show a new form (form2) when click button in form1.</p>
  
  <p>this is my code.</p>
  
  <pre><code>        using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  
  namespace SliceEngine
  {
      public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
          }
  
          private void Form1_Load(object sender, EventArgs e)
          {
  
          }
          private void button5_Click(object sender, EventArgs e)
          {   
              Form2 form2 = new Form2();
              form2.ShowDialog();            
           }
      }
  }
  </code></pre>
  
  <p>the error show </p>
  
  <blockquote>
    <p>the type or namespace name 'Form2' could not be found (are you missing
    a using directive or an assembly reference?)</p>
  </blockquote>
  
  <p>this is my code for form2.</p>
  
  <pre><code>    using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Windows.Forms;
  
  namespace SliceEngine
  {
      public partial class Form2 : Form
      {
          public Form2()
          {
              InitializeComponent();
          }
  
          private void Form2_Load(object sender, EventArgs e)
          {
  
          }
      }
  }
  </code></pre>
  
  <p>for form2, i just making the design interface.</p>
  
  <p>all i know when using java, i only need to declare the object first. what should i do for this?</p>