-1

How to get last element in Dictionary.

i search that. but i could not find answer.. just use .NET framework 3.5 this way dic.Values.Last(); but it doesn't in unity 3.5.5..

Roberto
  • 11,557
  • 16
  • 54
  • 68
Kiho Song
  • 1
  • 1

1 Answers1

1

Please see similar Stackoverflow question. Namely the "last" item in values isn't necessarily the "last" item you added to the dictionary. If order is important, use a list.

Community
  • 1
  • 1
Jerdak
  • 3,997
  • 1
  • 24
  • 36