1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

+ or & in vb.net

Discussion in 'Visual Basic ( VB )' started by Xintruder, Jan 7, 2009.

  1. Xintruder

    Xintruder New Member

    Joined:
    Dec 28, 2008
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Adminstrator Assistant
    Location:
    Oxford, England
    Hello this is a question.
    I saw this line of code:

    Code:
    Label3.Text = Now.Date + Now.TimeOfDay
    
    I told the coder that is wrong, he should use & instead. He insisted it is correct. He finaly showed me a screenshot with his line on visual studio, with no error or anything. Since when vb.NET used + for concatenation? Is there any other explanation?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    VB is not very strict and works fine
     
  3. Xintruder

    Xintruder New Member

    Joined:
    Dec 28, 2008
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Adminstrator Assistant
    Location:
    Oxford, England
    What the hell!!! :freak:
    we can connect strings using +'s in vb.net? seriosly :s ?
    I dont have visual studio atm, orr hell iw ould check it out. Thats dispicable.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    You can even do away without a variable being declared in vb6 as much as I know of
     

Share This Page