Blog code formatting
Hi guys,
While writing my first blog post, I stumbled on the following problem: how do I format the code that I want to publish on the blog? It seems that when I paste my code in the blog editor, I lose all formatting (except for the coloring).
My good friend Wesley told me that a website exists for creating formatted C# code. In my google search (the first link I came across actually) I found a website that will do exactly that.
This site can transform C#, vb and some other code types into the correct format. Jaj!
I will give a before-after example of a testclass I created. Please don't mind the code, just mind the formatting.
Before:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Reflection
{
public static class Class1
{
public static void SomeMethod(params string[] stackParams)
{
Class2.SomeOtherMethod();
}
}
}
After:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Reflection
{
public static class Class1
{
public static void SomeMethod(params string[] stackParams)
{
Class2.SomeOtherMethod();
}
}
}
Best formatting wishes to you ;-)