This commit is contained in:
CortexCore
2023-10-24 23:38:22 +08:00
parent 2c4710bc5d
commit bd40165ade
152 changed files with 3681 additions and 1531 deletions

View File

@@ -205,11 +205,11 @@ namespace BITKit
}
public static IEnumerable<T> TrySelectFirst<T>(this IEnumerable<T> self, Action<T> action)
{
if (self.Count() > 0)
if (self.Any())
{
action.Invoke(self.First());
}
return self;
return self;
}
public static bool TryGetAny<T>(this IEnumerable<T> self, Func<T, bool> factory, out T any)
{