Jelle Druyts .NET Consultant
Just another ignorant weirdo from Antwerp, Belgium trying to make sense out of it all
Before I get into the operators themselves, I'd like to discuss a somewhat related point. There is a running debate about whether Microsoft Visual Basic® .NET developers should use the Visual Basic runtime library or if they should abandon it in favor of direct use of the Microsoft .NET Framework classes.I have been programming in one form of Basic or another since the late 1970s. During all that time, the language has had a runtime library. I spent many years working with Digital's VAX Basic, which had a very powerful runtime library, nearly comparable to the one provided with Visual Basic.Most other languages have runtime libraries as well. This includes notable languages such as C, C++, and Java. No C programmer would ever consider the .NET Framework to support the C language unless it also included the C runtime library.Why should Visual Basic be any different? I honestly don't know. I fully exploit preexisting functionality whenever possible, and in particular I fully exploit the time-tested and familiar runtime library for any language I use. This includes the Visual Basic runtime library.I've recently seen posts on newsgroups where Visual Basic .NET developers were trying to figure out how to implement IsDate and IsNumeric by hand using the .NET Framework classes. While admirable from an academic standpoint, such an effort is redundant because those functions already exist in a well-implemented and tested form. This is especially true when the replacement code is 12-15 lines in length, compared to one function call from the runtime library.To me, and I think to most long-time Visual Basic developers, the runtime library for the language is virtually part of the language. The ability to reuse a powerful preexisting and pre-tested software library is compelling, and I strongly recommend that Visual Basic developers resist the pressure from non-Visual Basic developers to abandon this library and make full use of it in their development.
System
Microsoft.VisualBasic
CType
CInt
DirectCast
Convert.ToInt32
Object.ToString