F # seq
is actually just an alias for System.Collections.Generic.IEnumerable<T>
. Generic IEnumerable<T>
also implements non-generic IEnumerable
, and so your F # type should also do this.
The easiest way is to just have a non-generic call in common
type A(collection : seq<string>) = member this.Collection with get() = collection interface System.Collections.Generic.IEnumerable<string> with member this.GetEnumerator() = this.Collection.GetEnumerator() interface System.Collections.IEnumerable with member this.GetEnumerator() = upcast this.Collection.GetEnumerator()
source share