I want to do some stuff to WebParts based on the type of WebPart is being passed to a method. I'm finding that I'm doing:
if(obj is Microsoft.SharePoint.WebPartPages.ContentEditorWebPart)
...
else if (obj is SummaryLinkWebPart)
It smells funny to keep doing this for all WebParts. Is there a design pattern that I should be using instead?