Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   + or & in vb.net (http://www.go4expert.com/forums/or-in-vbnet-t15749/)

Xintruder 7Jan2009 12:07

+ or & in vb.net
Hello this is a question.
I saw this line of 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?

shabbir 7Jan2009 12:22

Re: + or & in vb.net
VB is not very strict and works fine

Xintruder 7Jan2009 12:47

Re: + or & in vb.net
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.

shabbir 7Jan2009 12:53

Re: + or & in vb.net
You can even do away without a variable being declared in vb6 as much as I know of

All times are GMT +5.5. The time now is 07:29.