Check if a SortedList object is synchronized (thread safe) in CSharp

Description

The following code shows how to check if a SortedList object is synchronized (thread safe).

Example


//www  .jav  a 2s.co  m
using System;
using System.Collections;
public class SamplesSortedList  {
   public static void Main()  {
      SortedList mySL = new SortedList();
      Console.WriteLine(mySL.IsSynchronized);

   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    Collections »




ArrayList
BitArray
Collection
Comparer
HashSet
Hashtable
LinkedList
List
ListDictionary
OrderedDictionary
Queue
SortedList
SortedSet
Stack
StringCollection
StringDictionary