Quote Originally Posted by BigEd781 View Post
I am curious as to why you use a safe cast instead of an explicit cast when you are not che3cking for null afterward? Just wondering.
It bugs me just a little when I see people do that too. I guess it just comes down to which exception you want to hunt down null object or InvalidCast, either one provide about the same information I guess, but I prefer getting an InvalidCast if I made an invalid cast. Actually for most UI callbacks I use the as operator and then if it is null I return doing nothing but writing an error into the application log. My theory is whatever the user was trying to do was not going to work out to well anyway so I might as well just do nothing.