xyguyr5weg
New Member
Just started learning .NET within the last week (been using classic ASP for about 3 years).<BR><BR>Anyway, I thought one of the major changes from VB/ASP to .NET was that the language would no longer automatically coerce variables for you. That is, if you had something like <BR><BR>Dim i as integer<BR>i = 7<BR>MsgBox i<BR><BR>and ran this in VB, it would work because VB would coerce i to a string. However, I thought in .NET you would need to do <BR><BR>MsgBox CStr(i) (or MessageBox.Show(i.ToString()))<BR><BR>However, I'm finding that .NET is apparently coercing the integer value the same as always.<BR><BR>I'm using .NET beta 2, so I don't know if this has been changed in the final release. Anyhow, I was just wondering if MS changed their minds on this or if I misunderstood from the start.<BR><BR>Thanks.Sadly VB.NET still let's you get away with a lot of sloppy programming. They had a bunch of changes to VB in Beta2 (such as making the And or Or boolean operators short-circuiting, having arrays indexes from 0 to n-1, etc.), but the VB community cried foul, so they took back a number of these enhancements to VB that would have made VB.NET a more modern programming langauge.<BR><BR>Don't get me wrong, VB.NET is still a lot better than VB6, but it really had a chance to be on par with Java/C#, but, IMO, they dropped the ball right at the end...