Application.Quit() is what you're looking for. However, it requires your solution to be Full-Trust (for obvious reasons, you will really be shutting down InfoPath). Application.Quit() takes an optional bForce argument:
| bForce | Optional | Boolean | Default value is False. Determines whether open forms will be saved during the quit operation. If set to True, all forms will be closed without saving, even if the data in the forms has been changed. If set to False, the user will be prompted to save the forms. |
A word of warning: do not use bForce=true unless you really mean it. It WILL close unsaved instances (and Designer too, I believe).
David Airapetyan / Software Services ArchitectQdabra® Software / Streamline data gathering to turn process into knowledge