【发布时间】:2011-03-07 02:59:24
【问题描述】:
在给定 fromIndex 和 toIndex 的情况下,返回 C# 数组子集的最佳方法是什么?
显然我可以使用循环,但还有其他方法吗?
这是我要填写的方法签名。
public static FixedSizeList<T> FromExisting(FixedSizeList<T> fixedSizeList, Int32 fromIndex, Int32 toIndex)
FixedSizeList 内部实现是
private T[] _Array;
this._Array = new T[size];
【问题讨论】:
-
大声笑,是的,我自己也注意到了。泛型伤害了我的大脑......