Reference page:
Http://www.yuanjiaocheng.net/entity/update-entity.html
Http://www.yuanjiaocheng.net/entity/delete-entity.html
Http://www.yuanjiaocheng.net/entity/add-entity-graph.html
Http://www.yuanjiaocheng.net/entity/update-entity-graph.html
Http://www.yuanjiaocheng.net/ASPNET-CORE/first.html
Yesterday saw the group of Dalao chatting, a person came out to ask this question
This question is supposed to be quite common.
int i = 0, t;
for (t = 0;t <= 5;t++)
{
i = i++;
Console.WriteLine (i);
The big guy says for is a disturbance, minus the same. int i = 0;
Console.WriteLine (i = i++); Console.WriteLine (i = i++); Console.WriteLine (i = i++); Group inside a lot of people began to say that is will increase, I also feel that will increase, at that time I feel that although I was assigned to 0, then the value of I will be increased, the first output equals 1. And then someone ran, and the result was a bunch of 0. When the expression is processed, the i++ is first processed, that is, the first step is not to assign a value of I to create I ', and then let I self-increment. After the i++ is processed, the lower-level arithmetic of the expression is processed, but I is involved in the operation, and at this time I is assigned to I. Finally, release the variables created by the system, such as I '. Then there is an upgrade version of the processing of ++i, and i++ exactly the opposite, the system will first give I self-increment processing, and then will be created i ' int i = 0;
Console.WriteLine (i = i++ + ++i); Console.WriteLine (i = i++ + ++i); The answer to the first output is 2 the second is 6 the first one is 0+2 the second is 2+4 novice beginner, where the wrong also please Dalao pointed out
Reprint Please contact
What is the value of C # I=0;i=i++,i?