0
Explain this?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { int x = 3; int y = ++x; Console.WriteLine(x+" "+y); } } }
1 Antwort
0
x = 3
++x is 4, the value(3) of x is add 1 and then move the value(4) to y, so the value of y is 4
x++ is 3, It move the value(3) to y first, then it add 1(become 4)