Delphi Dictionary and ordering data
问题 My code is: procedure TfrmSettings.btnFillDictClick(Sender: TObject); var Dict: TDictionary<string, string>; Item: TPair<string, string>; begin Dict := TDictionary<string, string>.Create(); Dict.Add('Key1', 'Text1'); Dict.Add('Key2', 'Text2'); Dict.Add('Key3', 'Text3'); Dict.Add('Key4', 'Text4'); for Item in Dict do begin ShowMessage(Item.Key + ' ' + Item.Value); end; end; Why almost every time I'm getting a different value in Showmessage? Why values are not stored in the order in which they