Saturday, October 25, 2003

Converting C# to visual basic

For some time now, Kamal Patel Has been running a web site with an excellent program to convert C# to visual basic. This can be accomplished in two ways, directly through the website or using a standalone program. Personally I prefer the standalone program because sometimes I don't like the idea of providing my code to web sites for conversion.

Generally the software works well but it has a few problems converting even simple classes and very often chokes on constructors. It also seems to have a problem with if statements and particularly changing curly braces in C# to the corresponding if, then, else, end if construct in visual basic.

It seems a shame that the software hasn't been upgraded recently to correct the simple errors because with such correction the software would be excellent. I often use it to convert examples written in C# into VB quickly and easily but I find I have to trim code or put it in in small chunks so that the converter doesn't tell me that it couldn't convert the code.

No comments: