C# | Check if StringCollection is synchronized (thread safe) Last Updated : 01 Feb, 2019 Comments Improve Suggest changes Like Article Like Report StringCollection class is a new addition to the .NET Framework class library that represents a collection of strings. StringCollection class is defined in the System.Collections.Specialized namespace. StringCollection.IsSynchronized property is used to get a value indicating whether access to the StringCollection is synchronized (thread safe) or not. Syntax: public bool IsSynchronized { get; } Return Value: This property always returns false. Note: Retrieving the value of this property is an O(1) operation. Example: CSHARP // C# code to check if StringCollection // is synchronized (thread safe) using System; using System.Collections; using System.Collections.Specialized; class GFG { // Driver code public static void Main() { // creating a StringCollection named myCol StringCollection myCol = new StringCollection(); // creating a string array named myArr String[] myArr = new String[] { "A", "B", "C", "D", "E" }; // Copying the elements of a string // array to the end of the StringCollection. myCol.AddRange(myArr); // checking if StringCollection is // synchronized (thread safe) Console.WriteLine(myCol.IsSynchronized); } } Output: False Reference: https://docs.microsoft.com/en-us/dotnet/api/system.collections.specialized.stringcollection.issynchronized?view=netframework-4.7.2 Comment More infoAdvertise with us Next Article C# | Check if StringCollection is synchronized (thread safe) S Sahil_Bansall Follow Improve Article Tags : C# CSharp-Collections-Namespace CSharp-Specialized-Namespace CSharp-Specialized-StringCollection Similar Reads C# | Check if StringDictionary is synchronized (thread safe) StringDictionary.IsSynchronized property is used to get a value indicating whether access to the StringDictionary is synchronized (thread-safe). Syntax: public virtual bool IsSynchronized { get; } Return Value: This method returns True if access to the StringDictionary is synchronized (thread safe), 1 min read C# | Check if ListDictionary is synchronized (thread safe) ListDictionary.IsSynchronized property is used to get a value indicating whether the ListDictionary is synchronized (thread safe) or not. Syntax: public bool IsSynchronized { get; } Return Value: This property always returns false. Below are the programs to illustrate the use of ListDictionary.IsSyn 1 min read C# | Check if Hashtable is synchronized (thread safe) Hashtable.IsSynchronized Property is used to get a value indicating whether access to the Hashtable is synchronized(thread-safe). Syntax: public virtual bool IsSynchronized { get; } Return Value: This property return true if access to the Hashtable is synchronized (thread-safe), otherwise it returns 2 min read C# | Check if ArrayList is Synchronized (thread safe) ArrayList.IsSynchronized Property is used to get a value which indicate whether access to the ArrayList is synchronized (thread safe). Syntax: public virtual bool IsSynchronized { get; } Return Value: This property returns the true if access to the ArrayList is synchronized (thread safe) otherwise i 2 min read C# | Check if the StringCollection is read-only StringCollection class is a new addition to the .NET Framework class library that represents a collection of strings. StringCollection class is defined in the System.Collections.Specialized namespace. StringCollection.IsReadOnly property is used to get a value indicating whether the StringCollection 1 min read Like