What is Lock in C#
-
Hi i want to design account class. with lock keyword in withdraw method.
-
Hi i want to design account class. with lock keyword in withdraw method.
refer: lock Statement (C# Reference)[^]
-
Hi i want to design account class. with lock keyword in withdraw method.
Unless you are using threading within your application,
lock
is pretty much irrelevant. It will not prevent other instances of your application from making changes, even if they are on the same PC. However, the MSDN[^] article onlock
covers it prety well if you are threading.Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
Hi i want to design account class. with lock keyword in withdraw method.