Page History

Syntax Highlighted Code Snippet

Allows for a code snippet to be styled according to the language specified.
Source Markup
{code:c#}
using System;
public class HelloWorld
{
   public static void Main(params string[] args)
   {
   Console.WriteLine("Hello World!");
   }
}
{code:c#}

Rendered Markup
using System;
public class HelloWorld
{
   public static void Main(params string[] args)
   {
   Console.WriteLine("Hello World!");
   }
}
Syntax Highlighting Supported Languages
Using {code:language} as shown above.

Language Notes
aspx c# Use for code snippets from .aspx, .ascx, .asax, .asmx, .master, and .skin files that have embedded C# code
aspx vb.net Use for code snippets from .aspx, .ascx, .asax, .asmx, .master, and .skin files that have embedded VB.NET code
ashx Use for code snippets from .ashx files
c# Use for C# code snippets
vb.net Use for VB.NET code snippets
html Use for HTML code snippets
sql Use for SQL code snippets
javascript Use for JavaScript code snippets
xml Use for snippets from .xml, .config, .dbml, and .xsd files
php Use for PHP code snippets
css Use for CSS code snippets