I just learned something new about C#. You can cast an array of any type to an array of objects, like so:
No compiler warnings, no runtime errors, everything is happy. You can then modify the array, like so:
Again, no errors anywhere, things just work, and you (hopefully) already knew that.
But what about this:
What’s going to happen there? No compiler warnings, but runtime EXPLOSION. I have never encountered an ArrayTypeMismatchException in practice, but there it is. Neat! Thanks, Channel 9!