>OfType is an extension method. It should be available to the Collection class since Collection implements IList which implements IEnumerable. You may have to import the System.Linq namespace if you haven't already done so.
Thanks, this is why it was working at the framework level, directly in the class, but not in the client application, as this namespace was not imported.