Limits around levels of Inheritance?

  • Thread starter Thread starter Shikari Shambu
  • Start date Start date
S

Shikari Shambu

I have an exception class that is derived 4 levels from the System.Exception
class.

System.Exception -> BaseApplicationException -> MyBaseException ->
MyException

When I throw a new MyException the code does not compile, says it needs to
be derived from System.Exception

I am on .NET ver 1.1.

I do reference the assembly containing MyException in the code where I am
trying to throw new MyException

Any ideas what could be cause of the error?

TIA
 
Shikari Shambu said:
I have an exception class that is derived 4 levels from the System.Exception
class.

System.Exception -> BaseApplicationException -> MyBaseException ->
MyException

When I throw a new MyException the code does not compile, says it needs to
be derived from System.Exception

I am on .NET ver 1.1.

I do reference the assembly containing MyException in the code where I am
trying to throw new MyException

Any ideas what could be cause of the error?

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.
 
Back
Top