28. March 2008 00:32
by Henrik Stenbæk
I just had one of those WOW experience today when I happened to use the switch code snippet with an enum.
I had an enum like this:
1: enum MyEnum
Start the video to se what happened when I tapped out of the snippet "switch_on" field.
WOW the snippet automatically created:
for each element in the enum. But how did it do that? Looking into the switch.snippet file I found:
It's the GenerateSwitchCases function that's doing the job - one out of 3 pre defined functions that available to "snippets"