2005-08-25 C#ネタ computer ちょっとした禁止事項というか。 class MyList : ArrayList { public void MyMethod() { foreach( object obj in this ) { if( condition ) { Remove( obj ); } } } }Remove() 後の foreach での obj 取得で例外発生。 つーわけでIEnumeratorとかIListとかの勉強を要す。 (正直、何故落ちるのかさっぱり)