private DateTime GetPreferedDateTime(ref Jpeg VtJpeg, ArrayList PreferExifDate) { DateTime Result = DateTime.MinValue; //foreach (string Item in LBExifDates.Items) //{ // PropertyTagId PTagId = GetPIdFromStr(Item); // if (VtJpeg.ExistPropertyItem(PTagId)) // return VtJpeg.GetPropertyItemAsDateTime(PTagId); //} foreach (string Item in PreferExifDate) { PropertyTagId PTagId = GetPIdFromStr(Item); if (VtJpeg.ExistPropertyItem(PTagId)) { return(VtJpeg.GetPropertyItemAsDateTime(PTagId)); } } return(Result); }