C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !



Posted By: Jyoti Sharma       Member Level: Gold       Posted Date: 05 Apr 2005       Category: C#

How do you implement thread synchronization (Object.Wait, Notify,and CriticalSection) in C#? -



Select Answer:

You want the lock statement, which is the same as Monitor Enter/Exit:
lock(obj) { // code } translates to
try {CriticalSection.Enter(obj); // code }
finally { CriticalSection.Exit(obj);
}



      
Your Test Score: 0 / 0



Next Question: Is it possible to have different access modifiers on the get/set methods of a property?
Previous Question: Is it possible to restrict the scope of a field/method of a class to the classes in the same namespace?
Related Questions:
  • How many parameters should an indexer in C# have


  • Which attribute you generally find on top of main method


  • jagged array is also called as ------


  • Which of the escape sequence is used for Backspace


  • Select the invalid access modifier in c#


  • Categories

    ASP.NET C# VB.NET 
    .NET Framework SQL Server Other 

    Submit Interview/Test Questions with Answers and make money from adsense revenue sharing program

    Want to prepare for an interview? Try our aptitude tests and standard interview questions first.


    dotNet Slackers   BizTalk Adaptors    Web Design


    Contact Us    Privacy Policy    Terms Of Use