Just add a jquery.codehighlighter in the forum page.
paste the code inside a pre tag,set the pre tag's classname to the code language:
such as <pre class="c#">int i=0;</pre>