An interface implementation in the F # class is more like an explicit interface implementation in C #, which means that interface methods do not become public method classes. To call them, you need to pass the class to the interface (which cannot fail).
This means that to call Disposeyou need to write:
(f2 :> IDisposable).Dispose()
, use , Dispose , , :
let test() =
use f2 = new Foo()
f2.DoSomething()
f2 , test.