title: How to check "Is Valid Image File" in C#
body: <p>I'm trying not using <code>try-catch</code> to achieve this goal</p>
  
  <p>here's my code</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Drawing;
  
  namespace ConsoleApplication3
  {
      class Program
      {
          static void Main(string[] args)
          {
              Bitmap imagePattern = new Bitmap(@"test.jpg");
              Console.Read();
          }
      }
  }
  </code></pre>
  
  <p>But if test.jpg is damage then C# will show error, so my question: is there a function like <code>IsValidImage()</code> in C#?</p>
  
  <p>THX!</p>