I understand that when you use an explicit cast like this:
(someType)someobject
you can get an invalid cast exception if someobject is not really someType.
As well I understand that when you cast with as like this:
myObject = someObject as someType
myObject is just rendered null if someObject isn't really someType.
How are these evaluated differently and why?
John Skeet has a C# faq where he explains the differences between the two operators. See paragraph 'What's the difference between using cast syntax and the
asoperator?'.Quote :