in C Sharp by
Q:
Why to use lock statement in C#?

1 Answer

0 votes
by
Lock will make sure one thread will not intercept the other thread which is running the part of code. So lock statement will make the thread wait, block till the object is being released.
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

0 votes
asked Oct 18, 2019 in C Sharp by Robin
0 votes
asked Feb 16, 2020 in C Sharp by rahuljain1
0 votes
asked Jun 16, 2020 in C Sharp by Hodge
0 votes
asked Jun 16, 2020 in C Sharp by Hodge
0 votes
asked Feb 16, 2020 in JAVA by rahuljain1
...