我想創建自己的自定義集合類型。繼承自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