我想创建自己的自定义集合类型。继承自Seq
我定义我的集合为:
type A(collection : seq<string>) =
member this.Collection with get() = collection
interface seq<string> with
member this.GetEnumerator() = this.Collection.GetEnumerator()
但是,这并不编译No implementation was given for 'Collections.IEnumerable.GetEnumerator()
我如何做到这一点?
您需要'IEnumerable'以及'IEnumerable的' –
2012-04-10 21:30:32