title: What is the equivalent C# call for the Bitmap class for the BITMAP.IsLoaded call in VB6?
body: <p>I'm converting a legacy program in VB6 to C# .NET Framework 4.8</p>
  
  <p>I have a call as follows in VB6</p>
  
  <pre><code>Private m_FingerprintBmp As BITMAP
  . . .
  Set m_FingerprintBmp = New BITMAP
  m_FingerprintBmp.LoadFromByteArray fingerprintByteArray
  If m_FingerprintBmp.IsLoaded Then
  </code></pre>
  
  <p>In C# I've converted as follows</p>
  
  <pre><code>Bitmap m_FingerprintBmp;
  . . .
  m_FingerprintBmp = new Bitmap(); // Invalid no default ctor
  m_FingerprintBmp.LoadFromByteArray(fingerprintByteArray);
  if (m_FingerprintBmp.IsLoaded)
  </code></pre>
  
  <p>But there is no default constructor in .Net for Bitmap class and there is no LoadFromByteArray() method and no IsLoaded property or method for the Bitmap class in C#
  What would an equivalent call be in .NET?</p>
  
  <p>[EDIT]  What I have determined is that VB6 supports the concept of a BITMAP instance that doesn't have an image loaded but the .NET Bitmap class does not have a default constructor so it seems any .NET Bitmap instance must contain some form of bitmap image.  So the concept of IsLoaded does not exist for .NET Bitmap class.  So my conclusion is I should use a null reference to indicate an unloaded Bitmap instead of an instance without an image. </p>
  
  <p>Can someone confirm my conclusion is correct?</p>