Question: I want an implementation of `List<T>` as a property which can be used thread-safely without any doubt.

Something like this:

```
private List<T> _list;

private List<T> MyT
{
    get { // return a copy of _list; }
    set { _list = value; }
}

```

It seems still I need to return a copy (cloned) of collection so if somewhere we are iterating the collection and at the same time the collection is set, then no exception is raised.

How to implement a thread-safe collection property?

Answer: 
C#'s `ArrayList` class has a [`Synchronized`](https://learn.microsoft.com/en-us/dotnet/api/system.collections.arraylist.synchronized) method.

```
var threadSafeArrayList = ArrayList.Synchronized(new ArrayList());

```

This returns a thread safe wrapper around any instance of `IList`. All operations need to be performed through the wrapper to ensure thread safety.
Use the `lock` statement to do this. ([Read here for more information.](http://msdn.microsoft.com/en-us/library/c5kehkcz%28v=vs.71%29.aspx))

```
private List<T> _list;

private List<T> MyT
{
    get { return _list; }
    set
    {
        //Lock so only one thread can change the value at any given time.
        lock (_list)
        {
            _list = value;
        }
    }
}

```

FYI this probably isn't exactly what your asking - you likely want to lock farther out in your code but I can't assume that. Have a look at the `lock` keyword and tailor its use to your specific situation.

If you need to, you could `lock` in both the `get` and `set` block using the `_list` variable which would make it so a read/write can not occur at the same time.