class Test def main t = @[1, 2, 3] .takeICloneable(t) .takeICollection(t) .takeIEnumerable(t) # TODO: .takeIList(t) u = t.toList # IEnumerable.toList extension method assert u[0] == 1 and u[1] == 2 and u[2] == 3 assert t == u.toArray assert t.clone == t # ICloneable.clone # TODO: assert t.count == 3 # IList.count # TODO?: MSDN says arrays implement ICollection, but the C# compiler does not like using an ICollection method: # assert t.contains(1) # ICollection.clear def takeICloneable(x as ICloneable) pass def takeICollection(x as ICollection) pass def takeIEnumerable(x as IEnumerable) x.toList def takeIList(x as IList) pass