using System; namespace System.Threading { static class Monitor { public static void Enter(object obj, ref bool locked) { locked = true; Console.WriteLine("Enter"); } public static void Exit(object obj) { Console.WriteLine("Exit"); } } } namespace MonitorEnterTest { class Program { static void Main(string[] args) { var syncRoot = new object(); lock (syncRoot) { } Console.WriteLine("Press any key!!!"); Console.ReadKey(); } } }