I'm trying not using try-catch to achieve this goal
here's my 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(); } } } But if test.jpg is damage then C# will show error, so my question: is there a function like IsValidImage() in C#?
THX!