C# SortedList IsSynchronized

Description

SortedList IsSynchronized gets a value indicating whether access to a SortedList object is synchronized (thread safe).

Syntax

SortedList.IsSynchronized has the following syntax.


public virtual bool IsSynchronized { get; }

Example

The following code example shows how to synchronize a SortedList object, determine whether a SortedList is synchronized, and use a synchronized SortedList.


/*from   w  w w .  j a  va  2  s  . c om*/
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 »
    System.Collections »




ArrayList
BitArray
Comparer
Hashtable
Queue
SortedList
Stack