I am new to event and delegates. How can I implement an enqueued event for an object of type Queue
?
I am using C# and .Net 4.0
There are no events fired from the System.Collections.* suite of classes. Since you're using .NET 4.0, you may want to look into BlockingCollection
The default backing type for BlockingCollection
Another great feature of BlockingCollection
For a great write up on all aspects of this subject, I suggest checking out this blog post from Alexeandra Rusina. The post also covers ways to work with BlockingCollection using the Task Parallel Library.