1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

HashSet ClearAndDelete

This commit is contained in:
Brian Fiete 2024-03-26 07:31:04 -04:00
parent bceca3e699
commit 96436ad825

View file

@ -1303,4 +1303,14 @@ namespace System.Collections
}
}
}
public extension HashSet<T> where T : delete
{
public void ClearAndDelete()
{
for (var val in this)
delete val;
Clear();
}
}
}