I have a class with the following method:
public List<Bike> bikesCopy
{
get
{
List<Bike> bs;
lock (_bikes) bs = new List<Bike>(_bikes);
return bs;
}
}
Which makes a copy of another list, private List<Bike> _bikes;
The strange thing now is, that I get the following error:
Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
What is the problem here?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…