给定 fromIndex 和 toIndex,返回 C# 数组子集的最佳方法是什么?
显然我可以使用循环,但还有其他方法吗?
这是我要填写的方法签名。
public static FixedSizeList<T> FromExisting(FixedSizeList<T> fixedSizeList, Int32 fromIndex, Int32 toIndex)
FixedSizeList 内部实现是
private T[] _Array;
this._Array = new T[size];