Testing code formatting in blog post

A while ago I started a blog. In the beginning I came across a visual studio add-in for showing sources as HTML. I just had to test it. You can find the tool here CopySourceAsHtml.

A result of this add-in is the one below.

  250  private static void MakeFileWritable(FileSystemInfo dsInfo)

  251         {

  252             FileAttributes flags;

  253             flags = dsInfo.Attributes;

  254             if (flags == FileAttributes.ReadOnly)

  255             {

  256                 flags &= ~FileAttributes.ReadOnly;

  257             }

  258             dsInfo.Attributes = flags;

  259         }

 

I think it looks pretty kewl. It wasn’t a smart thing to use the horrible colours on the download page. Luckily the html will look exactly the same as it looks in visual studio.

About Kees Dijk

Husband, father and Software Architect at Sogeti. Loving my work and having fun while doing it. Interested in all the aspects of software development with a special love for Model Driven Development, Code Generation and Software production lines.

Published by

KeesDijk

Husband, father and Software Architect at Sogeti. Loving my work and having fun while doing it. Interested in all the aspects of software development with a special love for Model Driven Development, Code Generation and Software production lines.

2 thoughts on “Testing code formatting in blog post”

  1. I take your point about the ugly colors. I was looking for the most extreme colors possible to demonstrate the tool’s ability to handle the different foreground and background colors in the line numbers, the edited text, etc. I’ll likely update the site with more examples, and choose some more normal colors. 🙂

    Thanks for recommending CopySourceAsHtml!

    Colin

Leave a Reply

Your email address will not be published. Required fields are marked *