By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,137 Members | 1,527 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,137 IT Pros & Developers. It's quick & easy.

how to throw exception

P: n/a

I want to throw exception dynamically. This what I want
to do

For example I want to throw System.Net.WebException
I will know the full exception name at run time, can I
create a exception and throw it.

I know how to do it if we hardcode the exception

System.Net.WebException oExp = new System.Net.WebException

But in my application I will know the Assembly name
(System.Net.WebException) of the Exception at runtime, so
I need to create a exception dynamically and throw it,

Is it even possible to do it?
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.