I don't really get what the function of "+=" is.. Could someone explain it to me? Like what's the different between "=" and "+="
I've got something like this now: b +=(a[i]);
Thanks!
I don't really get what the function of "+=" is.. Could someone explain it to me? Like what's the different between "=" and "+="
I've got something like this now: b +=(a[i]);
Thanks!
b = a assigns a to b
b += a assigns b+a to b
Ex:
int a = 5;
int b = 2;
b = a; //b is now 5
vs.
int a = 5;
int b = 2;
b += a; //b is now 7
b = a[i] + b
But you can use it for add event
Button.Click += new System.EventHandler(Button_Click);