OneNote tries to be very good about respecting the format of copy/pasted stuff (and uses the Office method of giving you a few options after pasting to possibly reformat, but only at your option).
It keeps a Code style for formatting handy in the list of quick styles.
It syncs well across devices (using OneDrive, of course) and these days is also multiplatform with apps for all major platforms (Windows, iOS, Android, Mac OS X).