private static int CompareByName(ImageArchiveItem a, ImageArchiveItem b) { if(a == null) { Debug.Assert(false); return -1; } if(b == null) { Debug.Assert(false); return 1; } return string.Compare(a.Name, b.Name, StrUtil.CaseIgnoreCmp); }