posted 16 years ago
Hi Yuan,
The null literal is a special literal of the null type, which denotes that the reference it is assigned to doesn't point to any object.
A reference of any type can be assigned null, and that is why downcasting is working in that sense. Normally, for downcasting you need to consider the actual type of the object involved. But for a null reference there is no object pointed to, so you can cast a null reference to any type.
All code in my posts, unless a source is explicitly mentioned, is my own.