class ExampleClass { public void SetData(List<SomeDataType> newData) { lock (dataLock) { someData = new List<SomeDataType>(newData); } } }