how to throw exception

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • arun gunda

    #1

    how to throw exception


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

    For example I want to throw System.Net.WebE xception
    exception.
    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.WebE xception oExp = new System.Net.WebE xception
    ()
    throw(oExp);

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

    Is it even possible to do it?


Working...