I think it's very important to differentiate code text from normal text as it is very much another language, and it's standard proceedure to differentiate text written in other languages--usually using italics.
A good example of sites using code differentiation is the Stack Exchange family, as you may have noticed it's very important to differentiate code when asking programming questions, in no small part because the different, usually monospaced font, makes code easier to read.
Here's a good list of "Good programming fonts", monospaced fonts are usually the default for readability's sake as they clearly separate letters so you never have to wonder if that's an rn or an m. Clarity of l, I and 1 (
l, I and 1) are very important as well, as you can see l and I are identical using UX.SE's default font, but clearly identifiable in the nice monospaced fonts they use for code.
While I do recommend using a different font, using other methods of highlighting can be helpful too; if you have a programmer audience they will likely appreciate some consistant variable name/method name/ect highlighting similar to popular IDEs and editors like Notepad++. I believe Stack Overflow attempts to do this.