Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var myswitch = new Dictionary <Func<int,bool>, Action>
- {
- { x => x < 10 , () => //Do this!... },
- { x => x < 100 , () => //Do this!... },
- { x => x < 1000 , () => //Do this!... },
- { x => x < 10000 , () => //Do this!... } ,
- { x => x < 100000 , () => //Do this!... },
- { x => x < 1000000 , () => //Do this!... }
- };
- myswitch.First(sw => sw.Key(mynumbercheck)).Value();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement