Advertisement
Guest User

Untitled

a guest
Jan 26th, 2016
437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. var myswitch = new Dictionary <Func<int,bool>, Action>
  2. {
  3. { x => x < 10 , () => //Do this!... },
  4. { x => x < 100 , () => //Do this!... },
  5. { x => x < 1000 , () => //Do this!... },
  6. { x => x < 10000 , () => //Do this!... } ,
  7. { x => x < 100000 , () => //Do this!... },
  8. { x => x < 1000000 , () => //Do this!... }
  9. };
  10.  
  11. myswitch.First(sw => sw.Key(mynumbercheck)).Value();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement