Adding C# Support to Unobtrustive Code Highlighter  

Wednesday, September 24 2008
One of the things that has been a barrier for me posting more blog entries is that I am a stickler for presentation. Working for Microsoft, I have a lot of technical musings about all things .NET (specifically WPF, XBAPs, and the ASP.NET MVC). So I'm using this post as an attempt to showcase C# to the Unobtrusive Code Highlighter. Enjoy!

  public abstract class MyClassName
  {
     private List<string> _myMemberVariable = new List<string>();
     public List<string> MyMemberVariable
     {
       get { return _myMemberVariable; }
       set { _myMemberVariable = value; }
     }

    // Remark: Comments are colored correctly
    public void MyMethod(int myParam)
    {
      Console.Out.PrintLine("C# Code Formatting!");
    }
  }

You can download the javascript for this programming language over on the GitHub project page


  • Posted by Charlie Robbins