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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top