I have a class A that is inheriting from class B. Class B has a
constructor that I would like to use in Class A, so I chain to it.
However class B's constructor often misbehaves and it causes a mess
and throws a meaningless error. I would like to wrap the call to class
B's constructor in a try/catch so that I can at least throw something
of use. I can't see how I would do this with chaining however.
Everything that class B calls in its constructor has been marked
internal or private so I can't just decompile it and copy and paste
its constructor code out without copying several other functions (all
of which also call private and internal methods - you can see this
would get out of control).
In C# you chain by doing:
public MyClassName() :[this or base](arguments)
{
}
what I ned is something more like:
public MyClassName()
{
}