G
GeezerButler
If i have a property like this in my class:
private IList<SomeClass> products;
public IList<SomeClass> Products
{
get {return products;}
set {products = value;}
}
Is there any way to make this property thread safe?
If i try to lock getter and setter, different threads can still mutate
the list by calling myClass.Products.Add(), right?
private IList<SomeClass> products;
public IList<SomeClass> Products
{
get {return products;}
set {products = value;}
}
Is there any way to make this property thread safe?
If i try to lock getter and setter, different threads can still mutate
the list by calling myClass.Products.Add(), right?