CodeFormattingRules

Enter a topic name to show or a new topic name to create; then press Enter
Summary
examples of how to format code for display

How to Format Code

Sample input in the form:

{@CSharp
    [TestClass]
    public class UnitTest1
    {
	  [TestMethod]
	  public void TestIronWikiSyntax()
	  {
	    WikiScriptEngine.Initialize();
	    StringBuilder scriptSource = new StringBuilder();
	    scriptSource.AppendLine("WikiSyntax = IronWikiSyntax()");
	    scriptSource.AppendLine("so = ''");
	    scriptSource.AppendLine("for iwc in WikiSyntax.IronWikiClasses :");
	    scriptSource.AppendLine("    so = so + '||' + iwc.Name + '||' + iwc.Description + '||\r\n'");
	    scriptSource.AppendLine("ScriptOutput = so");
	    //scriptSource.AppendLine("");
	    //scriptSource.AppendLine("");
	    string result = WikiScriptEngine.ExecuteBehavior(scriptSource.ToString());
	    
	    Assert.IsNotNull(result);
	  }
    }

}@

produces output using the external SyntaxHighlighter

    [TestClass]
    public class UnitTest1
    {
	  [TestMethod]
	  public void TestIronWikiSyntax()
	  {
	    WikiScriptEngine.Initialize();
	    StringBuilder scriptSource = new StringBuilder();
	    scriptSource.AppendLine("WikiSyntax = IronWikiSyntax()");
	    scriptSource.AppendLine("so = ''");
	    scriptSource.AppendLine("for iwc in WikiSyntax.IronWikiClasses :");
	    scriptSource.AppendLine("    so = so + '||' + iwc.Name + '||' + iwc.Description + '||\r\n'");
	    scriptSource.AppendLine("ScriptOutput = so");
	    //scriptSource.AppendLine("");
	    //scriptSource.AppendLine("");
	    string result = WikiScriptEngine.ExecuteBehavior(scriptSource.ToString());
	    
	    Assert.IsNotNull(result);
	  }
    }

Supported brushes

Brushes are enabled by prefixing them with {@

Brush Reference Source Code Type
xx Bash
CSharp CSharp or C#
Css CSS
xx Diff
Java Java
JScript JavaScript or JScript or JS
Perl Perl
Php PHP
Plain Plain
PowerShell Power Shell
Python Python
Ruby Ruby
Sql SQL
Vb Visual Basic or VB
Xml XML or XHTML

Version: 4   Revised: 2013-04-13 18:32:04 Last Updated by: Rename Show Links to Topic