list: STL/CLR版LinkedList<T>
双方向リストなので挿入/削除位置がどこだろが高速。
#include <cliext/algorithm>
#include <cliext/list>
using namespace System;
using namespace System::Collections::Generic;
using namespace cliext;
int main() {
list<String^> l(gcnew array<String^> { L"two", L"four" });
l.push_front(L"ONE"); // アタマに追加
l.push_back(L"FIVE"); // ケツに追加
// "four"の手前に追加
l.insert(find(l.begin(), l.end(), gcnew String(L"four")), L"THREE");
for each ( String^ item in l ) {
Console::WriteLine(item);
}
return 0;
}