I was creating an integer and i wanted to instantiate it with 0 before working with.
I wrote firstly
int i = default(int);
then i removed it to replace with the other one which is
int i = 0;
I would like to know if my choice is the best in mini mini performance.
Will the default() function increase the instructions at compile time?
No, they are resolved at compile time and produce the same IL. Value types will be
0(orfalseif you have a bool, but that’s still 0) and reference types arenull.