2 ms·
It was an example of a language feature, that is short variable declarations in type switches, which avoid repetitive casting. The example below has the default
by Donch 12y ago
It was an example of a language feature, that is short variable declarations in type switches, which avoid repetitive casting. The example below has the default clause which handles unknown types. I suppose the point is that you'd never actually do any of this because the method is disgusting.
Thanks for the downvote :-)