mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
HashSet ClearAndDelete
This commit is contained in:
parent
bceca3e699
commit
96436ad825
1 changed files with 10 additions and 0 deletions
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue