If you look in the constructor of this class, you can see that it creates a ThreadHelper and passes it to the base class constructor. The constructor for ProgressDialogWithTask no longer takes ThreadHelper, instead it takes ISynchronizeInvoke. We know that the SynchronizeInvoke property is actually a ThreadHelper object, which needs to be disposed, so we cast it to ThreadHelper and then dispose it.