public static void Main()
    {
        LockSample lockObject = LockSample.GetInstance();

        lock (lockObject)
        {
            lockObject.MethodA();
        }
    }
    public static void Main()
    {
        LockSample lockSampleInstance = LockSample.GetInstance();

        lockSampleInstance.MethodA();
    }