Hi,
The SPListItem class has a property called "Attachments" this is a collection of attachments. The example here http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spattachmentcollection.item.aspx iterates through the collection using a for loop.
Hope this helps
Dave
My SharePoint Blog www.davehunter.co.uk/blog