Re: List and order question
"... is it safe to assume that when I add an object it will always go at the end, ...
That would be my assumption predicated on the definition found at
http://msdn.microsoft.com/en-us/library/3wcytfd1.aspx
Re: List and order question
Quote:
Originally Posted by
ThermoSight
Isn't MSDN cool? Quite often, you can get an answer just by checking out the class description in the docs. It's such a time saver, but yet not many people seem to make it their first stop for looking for info. :)
Re: List and order question
Often I check something there, and I make an assumption about something which in the end is partially false or there is a factor I don't know about and kicks me in the ***, so that's why I was asking.
But I'm guessing, it's safe then? There's no factors that could somehow change the order?
Re: List and order question
Quote:
Originally Posted by
Red Squirrel
Often I check something there, and I make an assumption about something which in the end is partially false or there is a factor I don't know about and kicks me in the ***, so that's why I was asking.
But I'm guessing, it's safe then? There's no factors that could somehow change the order?
If you read through the List<T> documention, you'll find that a list item can be accessed by index. Would it make sense to access a list item by index if the order changed underneath you?