Discussion Locked

casting at compile-time not available in VB

0 helpful
0 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Most of the differences that people note between these two .NET languages occurr because the default setting in VB.NET is Option Strict Off. It it is set to On, then, people will say, VB.NET is basically the same as C#.

One area where this is not true is in casting from one type to another. In C#, that occurrs at compile-time, and the compiler will check that. In VB, the "cast" occurrs in the run-time invokation of a function, and thus the app can generate a run-time exception if the build was made from VB.NET code.

0 replies

No replies were posted before this discussion closed.

This discussion is closed to new replies.