mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-12 05:14:10 +02:00
List.ClearAndDispose
This commit is contained in:
parent
039e462bfe
commit
757d6e09aa
1 changed files with 10 additions and 0 deletions
|
@ -1182,6 +1182,16 @@ namespace System.Collections
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension List<T> where T : IDisposable
|
||||||
|
{
|
||||||
|
public void ClearAndDisposeItems()
|
||||||
|
{
|
||||||
|
for (var item in this)
|
||||||
|
item.Dispose();
|
||||||
|
Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extension List<T> where T : String
|
extension List<T> where T : String
|
||||||
{
|
{
|
||||||
public bool Contains(T item, StringComparison comparison)
|
public bool Contains(T item, StringComparison comparison)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue