Here's my code:
String[] queries = new String[2];
int i = 0;
Boolean result;
queries[i++] = "<query 1>";
queries[i++] = "<query 2>"; //Warning shown here
result = dbOpenHelper.ExecuteMyTransaction(queries);
The second i++
gets highlighted and the warning 'The value changed at 'i++' is never used' is shown. This code was written by another person, and to my knowledge, here <query 1>
and <query 2>
get assigned to queries[1]
and queries[2]
respectively, but then it must show an error, as the array is of size 2. There's no error and this kind of confuses me on what's happening here. Can I safely remove the second assignment, or change the first one to queries[i]
?