This commit is contained in:
CortexCore
2025-04-14 15:39:28 +08:00
parent c1273357de
commit d8b8ddb8b6
23 changed files with 447 additions and 116 deletions

View File

@@ -154,12 +154,7 @@ namespace BITKit
}
public static bool TryRemove<TKey, TValue>(this IDictionary<TKey, TValue> self, TKey t)
{
if (self.ContainsKey(t))
{
self.Remove(t);
return true;
}
return false;
return self.ContainsKey(t) && self.Remove(t);
}
public static void Set<TKey, TValue>(this IDictionary<TKey, TValue> self, TKey key, TValue value)
{