reference assignment is atomic so why is Interlocked.Exchange(ref Object, Object) needed?
In my multithreaded asmx web service I had a class field _allData of my own type SystemData which consists of few List<T> and Dictionary<T> marked as volatile . The system data ( _allData ) is refreshed once in a while and I do it by creating another object called newData and fill it's data structures with new data. When it's done I just assign private static volatile SystemData _allData public static bool LoadAllSystemData() { SystemData newData = new SystemData(); /* fill newData with up-to-date data*/ ... _allData = newData. } This should work since the assignment is atomic and the threads