Blogging C# Source in WordPress

1
2
3
4
5
6
7
8
9
10
11
12
13
using System;
namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Console.WriteLine(Environment.NewLine + "Press Enter to exit.");
            Console.ReadLine();
        }
    }
}

New to WordPress so I fumbled around a bit figuring out a way to write about C#. I’m sure there are lots of ways to skin this cat but the first method I got working was with the WP-Syntax plugin. After installed, I copied my source from VisualStudio and stuffed it inside here :

<pre lang=”csharp” line=”1″> PASTE CODE HERE </pre>.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.