GeekInterview.com
Series: Subject: Topic:
Question: 10 of 460

Write a class in C# which get an action in its construction

Write a class in C# which get an action (parameter less delegate) in its construction and has a single public method bool execute() which does following:

1. Execute the action only if no other thread is currently executing the action.
2. If another thread is already executing, wait until thread finished before returning (but without executing action again)
3. Return true if current thread that action, otherwise false.
Asked by: annadm | Member Since Jun-2011 | Asked on: Jun 11th, 2011

View all questions by annadm

This Question is not yet answered!

Related Open Questions

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.