ChickenHouse,
Take a typical IR training/test route. Filed as an IFR flight but near the end it is normal to call 'Cancel IFR' when going around from the final missed approach into the visual circuit. Therefore you have flown under both IFR and VFR rules in the same flight.