ErrorHandler

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

All,

I have been using VB6 for a few years and it had the ability to raise custom
errors via Err.Raise. I was wondering if C# can do the same or better and
how I would code this. Does anyone have good examples or a website I can
check out.

Thanks
Msuk
 
I have been using VB6 for a few years and it had the ability to raise custom
errors via Err.Raise. I was wondering if C# can do the same or better and
how I would code this. Does anyone have good examples or a website I can
check out.

The (fairly close) C# equivalent of raising errors in VB is throwing
exceptions.

You can throw any of the exceptions in the .NET Framework, or you can create
your own...
http://www.dotnetspider.com/Technology/Tutorials/CustomExceptions.aspx
 
Back
Top