public static bool TryGetSingleItem <T>(IList <T> list, bool returnDefaultIfEmpty, out T value) { return(MiscellaneousUtils.TryAction <T>(delegate { return GetSingleItem(list, returnDefaultIfEmpty); }, out value)); }