using System;
using System.Collections;
namespace SyncRootTest
{
///
/// Summary description for Class1.
///
class Class1
{
///
/// The main entry point for the application.
///
[STAThread]
static void Main(string[] args)
{
ArrayList Lst = new ArrayList();
ArrayList Sync = ArrayList.Synchronized(Lst);
ArrayList Root = (ArrayList)Sync.SyncRoot;
if (Lst == Sync)
{
Console.WriteLine("Synchronized version is the same as not synchronized");
}
else
{
Console.WriteLine("Synchronized version is different from not synchronized");
}
if (Root == Lst)
{
Console.WriteLine("SyncRoot is the same as not synchronized version");
}
else
{
Console.WriteLine("SyncRoot is different from the not synchronized version");
}
}
}
}