General discussion


casting at compile-time not available in VB

By arzewski ·
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.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums