Conditional Statements - If Then vs. Select Case

Posted by cloyd800 on Stack Overflow See other posts from Stack Overflow or by cloyd800
Published on 2012-09-05T03:31:20Z Indexed on 2012/09/05 3:38 UTC
Read the original article Hit count: 107

Filed under:

I'm a bit new to programming, and based on the few sources I've read both on the web and the books I'm learning to teach myself they are able to define what IF THEN and SELECT CASE conditional statements are, but have failed to give a comparison as to why I would use one over the other and what best practices decide this.

If I'm understanding these conditional statements correctly, then both are based on a set of conditions with an outcome based around meeting these conditions, and if no conditions are met then an alternative outcome can be defined.

I'm having trouble in understanding when I would use an IF THEN statement, and when I'd use a SELECT CASE statement, and what best practices are used to define this decision.

Any insight on this would be greatly appreciated!

© Stack Overflow or respective owner

Related posts about vb.net