CodeSOD: Rename This

This post was originally published on this site

The Daily WTF

Visual Basic .NET is actually not a terrible language. I don’t think it’d ever be anyone’s favorite language, and these days it’s basically deceased, but it’s essentially C# with verbose syntax. Even the APIs are identical…

… almost.

Because, you see, when Microsoft released VB .NET, their core plan was that it should be “easy” to port your existing VB6 code into VB .NET. This meant recreating a lot of static functions in the global namespace, like Mid (substring), or Kill (file delete). There were better, cleaner ways to do all of those things. For example, Kill throws an exception if you try and delete a file that doesn’t exist, while File.Delete doesn’t (but provides a status code).

So while you should use the newer APIs, you could still do things the old fashioned way. It was like GoTo- you shouldn’t use it, but you could.

Russell F inherited some

To read the full article click on the 'post' link at the top.