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.
コレクションが変更されたときにエラーが発生するのはなぜですか?C#でアプリケーションをリリースしているときに列挙型の操作が実行されない場合がありますか?
コレクション内のオブジェクトへの参照の1つを直接/間接的に変更しようとしていることを意味します。
繰り返しで:
foreach(var item in myCollection) { item = new Item(); // Error item.Prop = "Something"; //OK }