General discussion

Locked

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.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Windows Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums