Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は HashSet を通過し、要素を保存するか、HashSet から要素を削除するか、何もしないという結果になる各要素に対して (複雑な) チェックを行いたいと考えています。
foreach ループでは HashSet を変更できず、インデックスも使用できないため、タスクを実行する方法がわかりません (最初に HashSet をコピーしたり、複数の LINQ 操作を適用したりするなどの遅いことを行う必要はありません。一度)。
助言がありますか?