What is the best or easier container I could use to retrieve the the last entry position ?
Or there are not better or easier than using Count ? is it ok to rely on count ?
Example:
List<Class> myList = new List<Class>();
int lastEntry = myList.Count - 1;
Message.Box(myList[lastEntry].Name);
There is no concurrent write to this list mainly reading.
Using
Countis fine forList<T>— or anything else that implementsICollection<T>orICollection— but you have an off-by-one error in your code. It should be…