Vielen Dank
Code: Select all
private List _data = new List(){"1","2","3","4","5"};
private object _locker =new object();
public IEnumerable GetData()
{
lock (_locker)
{
foreach (string s in _data)
{
yield return s;
}
}
}
Code: Select all
private List _data = new List(){"1","2","3","4","5"};
private object _locker =new object();
public IEnumerable GetData()
{
lock (_locker)
{
foreach (string s in _data)
{
yield return s;
}
}
}