quote:
Originally posted by billyy
I noticed it was possible, i just don't see the difference...
It's only easyer to read for people who... well...
it's just easyer for me >:l
Using Switch is shorter code and it is much faster code in execution.
Each time you do Else If Messenger.MyStatus, the interpreter needs to look up Messenger.MyStatus. This is of course useless because that variable isn't going to change between the If Then Else's.
Using a Switch statement makes that Messenger.MyStatus only needs to be looked up once.