I am preparing myself for an interview and I came across the followign question. I tried but I could not find anything which can create a class containing thread safe collec
The easiest solution is having a field of type string[]. Whenever a caller wants to add a string, create a new array with the new item appended and swap it for the old one.
This model does not require synchronization. It does not tolerate concurrent writers but it allows for concurrent reading.