This issue has been moved from a ticket on Developer Community.
[severity:Other]
For this code Intellisense suggest to use compound assignment, but it changes the behavior of the code.
Original code:
bool alwaysTrue = true;
int pkOrder = 0;
int? current = null;
for (int i = 0; i < 10; i++)
{
current = alwaysTrue == true ? pkOrder = pkOrder + 1 : null;
Console.WriteLine(current);
}
Results the following output:
1
2
3
4
5
6
7
8
9
10
Intellisense suggestion for this:
bool alwaysTrue = true;
int pkOrder = 0;
int? current = null;
for (int i = 0; i < 10; i++)
{
current = alwaysTrue == true ? pkOrder++ : null;
Console.WriteLine(current);
}
Results:
0
1
2
3
4
5
6
7
8
9
Original Comments
Feedback Bot on 6/8/2021, 06:22 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)
This issue has been moved from a ticket on Developer Community.
[severity:Other]
For this code Intellisense suggest to use compound assignment, but it changes the behavior of the code.
Original code:
Results the following output:
1
2
3
4
5
6
7
8
9
10
Intellisense suggestion for this:
Results:
0
1
2
3
4
5
6
7
8
9
Original Comments
Feedback Bot on 6/8/2021, 06:22 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)