public void OneMethod()
 {
     LockThisBadSample lockObject = new LockThisBadSample();
     lock (lockObject) {
     // Do something else
     }
 }
        public void OneMethod()
        {
            LockThisBadSample lockObject = new LockThisBadSample();

            lock (lockObject) {
                // Do something else
            }
        }