title: C# How to check if a PictureBox contains an image in a specified imagelist?
body: <p>I need to know whether the <code>PictureBox</code> contains an <code>Image</code> in a specified <code>imageList</code>. Because if ImageList is long, it will take a lot to say
  in an <code>if-statement</code> if each image in <code>imageList</code>is in the PictureBox.
  and when I type</p>
  
  <pre><code>foreach (var image in imageList1)
          {
              if (pictureBox1.Image = image)
              {
                  //Code
              }
          }
  </code></pre>
  
  <p>It doesn't work :/</p>