Answer: </P><P align=justify>You want the lock statement, which is the same as Monitor Enter/Exit: </P><P align=justify>lock(obj) </P><P align=justify>{</P><P align=justify>// code</P><P align=justify>}</P><P align=justify>translates to: try </P><P align=justify>{</P><P align=justify>CriticalSection.Enter(obj);</P><P align=justify>// code</P><P align=justify>} </P><P align=justify>finally </P><P align=justify>{</P><P align=justify>CriticalSection.Exit(obj);</P><P align=justify>}
Tags:Interview Questions, Microsoft, C#,
Please submit your Interview Answer for the above Question via replying to this post. Thank you for visiting to our blog, Have a Good Day!.
Sponsor Advertisement
Real Estate Management System Software
Real Estate Management Software is an advanced end-to-end Real Estate Office Management System that enables Real Estate Agencies to manage more effectively, search prorty details, keep property owner data etc. Web-based tracking and accounting solution ideal for commercial, residential housing....
No comments:
Post a Comment