Tôi muốn tạo loại bộ sưu tập tùy chỉnh của riêng mình.Thừa kế từ Seq
tôi xác định bộ sưu tập của tôi như:
type A(collection : seq<string>) =
member this.Collection with get() = collection
interface seq<string> with
member this.GetEnumerator() = this.Collection.GetEnumerator()
Nhưng điều này không biên dịch No implementation was given for 'Collections.IEnumerable.GetEnumerator()
Làm thế nào để tôi làm điều này?
Bạn cần 'IEnumerable' cũng như' IEnumerable ' –