Is something wrong when i use else if ?
Nope. Looks fine to me
1 Like
Hi Pechy6,
Did you get any error message? Or do you feel that there might be a problem with your code?
I cannot spot any problem either.
See also:
- Forum User Guides : How to apply code formatting within your post
- Forum User Guides : How to mark a topic as solved
1 Like
Hi Nina,
its fine just i wanted to ask. Because when i was studying C#, our teacher pressed up on us. We must use else if (after one if statement). Little dumb question i know but i rather asked. Thanks all
You don’t have to use else if. In Rick’s code, only one of those conditions will be true. The tag can only be one value. There isn’t really a need for the else, but ultimately your code and Rick’s code does the same thing
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.