Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
不幸的是,Delphi 2009 的 Generics.Collections 中的 TList 缺少 Move 方法。我迫切需要它。有人可以从以后的版本中为我发布吗?
我打算在后代类中使用它。
您可以像这样实现它:
procedure TMyList<T>.Move(CurIndex, NewIndex: Integer); var Item: T; begin Item := Self[CurIndex]; Delete(CurIndex); Insert(NewIndex, Item); end;