Quantcast
Channel: switch case help
Viewing all articles
Browse latest Browse all 5

switch case help

$
0
0
as an aside you may want to trim the string for whitespace incase the user fat fingers a space. Such as

switch ( strChampion.Trim() )

and also do a tolower in case the user doesn't type in it as "Liverpool" but "liverpool" so do this

switch ( strChampion.Trim().ToLower())
{
    case "liverpool" : // as the lower since all will be that way.

HTH


William Wegerson (www.OmegaCoder.Com)

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>