F# constructor syntax - overiding and augmenting new
Posted
by Benjol
on Stack Overflow
See other posts from Stack Overflow
or by Benjol
Published on 2010-06-10T06:13:00Z
Indexed on
2010/06/10
14:53 UTC
Read the original article
Hit count: 215
I have a non-disposable class with Open/Close syntax that I'd like to be able to use
, so I'm trying to inherit from it, and work the Open into the new
and the Close into Dispose.
The second part is ok, but I can't work out how to do the Open:
type DisposableOpenCloseClass(openargs) =
inherit OpenCloseClass()
//do this.Open(openargs) <-- compiler no like
interface IDisposable
with member this.Dispose() = this.Close()
(cf. this question which I asked a long time ago, but I can't join the dots to this one)
© Stack Overflow or respective owner