public static bool TakeAndSave(ICapture camera, string fileName) { for (int i = 0; i < 3; ++i) { var image = camera.Take() as Bitmap; if (image != null) { image.Save(fileName); return (true); } Thread.Sleep(250); } return (false); }