Converting Code

01 Jun 2009

Quite often (well ok, not that often) I am asked why I convert most C# code I find into VB.Net. The main reason is I find that it helps me to understand the code.

To put it into perspective, my Test Projects directory contains around 50 projects with about a 50/50 split of C# projects and VB.Net projects.

When I come across a sample online (often in a blog) it is either small enough to be understood straight away, or something much larger that needs a lot of thinking and looking at (look at Jeremy Miller's Build Your Own CAB Series) to fully understand. I like to fully understand code so that I may use it intelligently and apply it when it suits.

To this end I find rather than copy and pasting the code into VS and compiling it, converting it to the other .Net language (VB.Net -> C#, C# - VB.Net, F#...well I haven't got round to that yet) helps me to really understand the code, down to all the constructs and the overall picture of what and how the code works.

So it's not just because I prefer VB.Net (although that has something to do with it) it's because understanding what code is doing is far more important than what language it's written in.

code

« Microcontrollers for MenuItems The Reading List »
comments powered by Disqus