.NET newbie question

Results 1 to 2 of 2

Thread: .NET newbie question

  1. #1
    Join Date
    Dec 1969

    Default .NET newbie question

    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&#039;m finding that .NET is apparently coercing the integer value the same as always.<BR><BR>I&#039;m using .NET beta 2, so I don&#039;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.

  2. #2
    Join Date
    Dec 1969

    Default RE: .NET newbie question

    Sadly VB.NET still let&#039;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&#039;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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts