Ok I derive a type B
from a base class A
.
A
implements IDisposable
explicit but I have to do additional cleanup in B
, so I implement IDisposable
in B
:
interface IDisposable with
member i.Dispose() =
// ... additional work
base.Dispose() // <- want to do but cannot
Question is: how to access the Dispose-method from base?
(base :> IDisposable).Dispose()
yields compiler error: Unexpected symbol ':>' in expression. Expected '.' or other token.
Doing something like
(i :> IDisposable).Dispose()
of course yields a StackOverflowException
on runtime - so how can I do this? Sorry but never encountered something like this before...