title: argumentnullexception bitmap save to memorystream
body: <p>I'm trying to save my Bitmap to MemoryStream - what wrong in this code? Why it gets me argumentnullexception ??  </p>
  
  <pre><code>private void insertBarCodesToPDF(Bitmap barcode)
      {
  
              .......
              MemoryStream ms = new MemoryStream();
              barcode.Save(ms, System.Drawing.Imaging.ImageFormat.MemoryBmp); //&lt;----
              byte [] qwe = ms.ToArray();
              .......
  
      }
  </code></pre>
  
  <p><strong>UPD:</strong> StackTrace
  System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
  in WordTest.FormTestWord.insertBarCodesToPDF(Bitmap barcode) </p>