F#: Define an abstract class that inherits an infterface, but does not implement it

Posted by akaphenom on Stack Overflow See other posts from Stack Overflow or by akaphenom
Published on 2010-05-22T19:50:53Z Indexed on 2010/05/22 20:00 UTC
Read the original article Hit count: 323

Filed under:
|

I owuld like to define an abstract class that inerhits from UserControl and my own Interface IUriProvider, but doesn't implement it. The goal is to be able to define pages (for silverlight) that implement UserControl but also provide their own Uri's (and then stick them in a list / array and deal with them as a set:

type IUriProvider = 
interface
    abstract member uriString: String ;
    abstract member Uri : unit -> System.Uri ;
end


type UriUserControl() as this = 
    inherit IUriProvider with
        abstract member uriString: String ;
    inherit UserControl()

Also the Uri in the definition - I would like to implement as a property getter - and am having issues with that as well.

this does not compile

type IUriProvider = 
    interface
        abstract member uriString: String with get;
end

Thank you...

© Stack Overflow or respective owner

Related posts about object-oriented-design

Related posts about F#