"Circular" List ?
-
Hi, Just before I go and reinvent the wheel, I wanted to know if there's such a collection in the .NET Framework 2.0 that could be used as some kind of "Circular list", that is, everytime I want to get a value from it, I get the next item in the list, looping back at the beginning when reaching the end. Thank you
Luc Morin
-
Hi, Just before I go and reinvent the wheel, I wanted to know if there's such a collection in the .NET Framework 2.0 that could be used as some kind of "Circular list", that is, everytime I want to get a value from it, I get the next item in the list, looping back at the beginning when reaching the end. Thank you
Luc Morin
Hi, I don't think there is one but I can give you a hint: If you don't want to implement it completely yourself you can inherit from ArrayList and just overwrite GetEnumerator. This way you just have to implement your own IEnumerator. Robert