开发者

Cast and throw exception if failed

I need to cast an o开发者_开发问答bject as another and throw an exception if it fails, to check the type of the object.

What kind of an exception should I be looking to catch? That is, if casting fails, what exception does it throw?


InvalidCastException

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜