using System; using System.Threading; using System.Runtime.CompilerServices; public class Gen { [MethodImplAttribute(MethodImplOptions.Synchronized)] public int synch () { return 123; } public int callSynch () { return synch (); } } public class main { public static int Main () { Gen gs = new Gen (); gs.synch (); gs.callSynch (); return 0; } }