Not entirely convinced by the performance values so I figured I'd post here for a quick answer.
Would this for example...
Code:
new value;
if (value == 1)
{
//Do stuff
}
else if (value == 2)
{
//Do other stuff
}
Be a bit more effective in terms of performance or this...
Code:
new value;
switch (value)
{
case 1:
{
//Do stuff
}
case 2:
{
//Do other stuff
}
}
Purely, which one runs better or does it not matter? I like Switch statements a lot better.
Cheers,
- Jack