title: How to check if a picture box contains a certain image using an IF statement
body: <p>I am trying to check if a PictureBox contains a certain image, the way I am trying to do it seems like it would work in my head, however, does not, i am not sure if there is any other way to check if the picturebox on the form contains a certain image. </p>
  
  <pre><code>private void user_btn_Click(object sender, EventArgs e)
  {         
      //If statement to check if the forms picture box contains a certain image 
      if (pictureBox1.Image == Resources.user_male_white_red_brown)
      {
           this.Hide();
           UserProfile User = new UserProfile();
           User.ShowDialog();
           User.pictureBox1.Image = Resources.user_male_white_red_brown;
           this.Close();
      }
      else if (pictureBox1.Image == Resources.user_female_olive_orange)
      {
            this.Hide();
            UserProfile User = new UserProfile();
            User.ShowDialog();
            User.pictureBox1.Image = Resources.user_female_olive_orange;
            this.Close();
       }
  }
  </code></pre>