Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleSwitch
Keywordsquick question, quiz, Switch
CategoriesTips and Tricks
 
i_mod_10 = i Mod 10
j = Switch(i_mod_10 <= 2, 2, i_mod_10 <= 5, 5, i_mod_10 <= _
    8, 8, True, 9)
 
  1. What does this code do?
  2. Can you reformat this code so it's easier to understand?
  3. Can you think of an alternative approach that's also easy to understand?
  4. Which version is better?

Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated