Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Merger

Code
TextBox1.Text += IO.File.ReadAllText(Txt)
Why do you use += ? It's &= in this case. "+" is used for mathematical operation ...

Also, the code is pretty easy, and I think you can make it shorter by many ways. Still, it can be useful for people to learn how Open/SaveFileDialog works (I guess ?)


Code
MsgBox("I Cant!", vbInformation, "You Suck!")
I just saw it. MsgBox is an old method ported from VB6. It's better to use MessageBox.Show. (It's not very important, since Msgbox call Messagebox.Show, but still a better habit)
Please, don't start an argue just for a thing like that, that wasn't offensive ...
Just that using & is better in this case.
(Feb 9, 2013 06:28 AM)Doga Wrote:  You should know according to computer, 5+5 = 55, unless specified as an integer.

Yeah, but when the 2 types mix and match, you can get unexpected results..

[Image: gcxQDUw.png]
Produces:
[Image: Mq1R1ip.png]


(Feb 9, 2013 09:52 AM)tweety Wrote:  I use + over & out of habit unless I write a integer value to a string value, in which case you will need the & over +. Even so, you can just convert the integer to a string value and it solves the problem. It's just a habit, no right or wrong here.

Well, MSDN says you should always use & to concat strings..

Quote:Language Guidelines
String Data Type
To concatenate strings, use an ampersand (&).
VB:
MsgBox("hello" & vbCrLf & "goodbye")


Source: http://msdn.microsoft.com/en-us/library/h63fsef3.aspx


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by sh@rpJul 5, 2020 07:05 AM 212 22,356 Jul 5, 2020 07:05 AM
Last Post: sh@rp
[C#] by dreamer66Dec 12, 2017 10:46 AM 5 342 Dec 12, 2017 10:46 AM
Last Post: sh@rp
[.NET] by BahNahNahJul 26, 2016 06:50 PM 27 1,193 Jul 26, 2016 06:50 PM
Last Post: Ninja