I have List<QueueItem> QueueItemList
list of objects. I am filtering the objects list by object property Status
and assign filtered list to processingList
. If I will change object Status
property in the QueueItemList list does it will be changed in processingList
too?
public List<QueueItem> GetItems()
{
lock (Locker)
{
return QueueItemList.ToList();
}
}
var processingList = GetItems.Where(p => p.Status== QueueItemStatus.Processing).ToList();