2.0 question, SyncRoot in generic collections?

  • Thread starter Thread starter Jon Shemitz
  • Start date Start date
J

Jon Shemitz

I'm not sure if this is the place to ask about this, but why is there
no SyncRoot in List<T> &c the way there is in ArrayList &c? Instead,
List<T> supports ICollection, so we have to cast the list to
ICollection to access the SyncRoot -

lock (((ICollection) ThisList).SyncRoot) ;
// instead of "lock (ThisList.SyncRoot) ;"

This doesn't make a lot of sense to me. Am I missing some perfectly
obvious reason? Is there some reasonable chance this will change while
2.0 is still in beta?
 
Back
Top