¡@

Home 

c# Programming Glossary: attachmentsfilepath

Exception during iteration on collection and remove items from that collection [duplicate]

http://stackoverflow.com/questions/2545027/exception-during-iteration-on-collection-and-remove-items-from-that-collection

names attachmentFileNames.Split new char ' ' int index 0 attachmentsFilePath is ArrayList holding full path of fiels user selected at any.. user selected at any time. foreach var fullFilePath in attachmentsFilePath bool isNeedToRemove true Extract filename from full path. string.. not found in names array remove it. if isNeedToRemove attachmentsFilePath.RemoveAt index isNeedToRemove true index catch Exception ex..