using System; using System.Threading; class MainClass { [STAThread] static void Main(string[] args) { int r = 0; object t = new object(); try { Monitor.Enter( t ); r++; } finally { Monitor.Exit( t ); } } }
in monotor in monotor