Home » , » Formatting your codes in your blog hosted by Blogger

Formatting your codes in your blog hosted by Blogger

1. Using the syntaxhighlighter 2.0
Just follow the steps in http://www.craftyfella.com/2010/01/syntax-highlighting-with-blogger-engine.html

The simpliest way is to use the 'pre' tag as follows:
"<pre class="brush: csharp">// Comment</pre> "



See an example below:

// Comment
public class Testing {
public Testing() {
}
 
public void Method() {
/* Another Comment
on multiple lines */
int x = 9;
}
}

2. Using github

Easiest way to share code is with a public gist. Just write one up and paste in the embed code. Easy peasy.

Popular Posts