They are still some (at least 40) examples of some code that is only used due to Medium Trust, which was dropped a while ago. In most cases it is the following:
or something similar, instead of:
In some cases there's a line of comment above it explaining why the casting is there. On one hand it's unnecessary now, but it also became a bad example: I've seen new Orcharders (is it a word yet?) follow this example, because they were learning from e.g.
the Core AdminController. I'll gladly fix it.