I have a class with the following method:
public List bikesCopy { get { List bs; lock (_bikes) bs = new Li
Well you could try:
using System.Linq; //ToList() is an extension function defined here ... lock(_bikes) return _bikes.ToList();
The details of the exception are discussed here: Why doesn't a foreach loop work in certain cases?