Sort an ArrayList
#include "stdafx.h" #using <system.dll> using namespace System; using namespace System::Collections; using namespace System::Collections::Specialized; void main() { StringDictionary ^strdict = gcnew StringDictionary(); strdict->Add("D", "d"); strdict->Add("F", "f"); strdict["C"] = "c"; ArrayList ^alist = gcnew ArrayList(); alist->AddRange(strdict->Keys); alist->Sort(); }