• 1.9k
  • 201
  • 19.8k

Exception Class

Oct 15 2015 12:48 PM

I have an Exception Class as below.

[code]using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test
    class MyException : Exception

I call this class as below

[code]if (result == false)
                throw new MyException();

But I get an error that says 'Unhandled exception has occured in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.

Exception of type Test.MyException was thrown.

Please help.


Answers (3)