James Michael Hare

...hare-brained ideas from the realm of software development...
posts - 104, comments - 761, trackbacks - 0

My Links

News

Welcome to my blog! I'm a solutions architect at Scottrade Inc. in Saint Louis, MO. I've been doing C++/C# development for over 18 years, but have definitely learned that there is always more to learn!

All thoughts and opinions expressed in my blog and my comments are my own and do not represent the thoughts of my employer.

MCC Logo MVP Logo

Follow BlkRabbitCoder on Twitter

Twitter












Tag Cloud

Archives

Post Categories

Collections

There are 4 entries for the tag Collections
C#/.NET Little Wonders: The ConcurrentDictionary
Once again we consider some of the lesser known classes and keywords of C#. In this series of posts, we will discuss how the concurrent collections have been developed to help alleviate these multi-threading concerns. Last week’s post began with a general introduction and discussed the ConcurrentStack<T> and ConcurrentQueue<T>. Today's post discusses the ConcurrentDictionary<T> (originally I had intended to discuss ConcurrentBag this week as well, but ConcurrentDictionary had enough...

Posted On Thursday, February 17, 2011 6:00 PM | Feedback (7) | Filed Under [ My Blog C# Software .NET ]

C#/.NET Little Wonders: The ConcurrentStack and ConcurrentQueue
Once again we consider some of the lesser known classes and keywords of C#. In the next few weeks, we will discuss the concurrent collections and how they have changed the face of concurrent programming. This week’s post will begin with a general introduction and discuss the ConcurrentStack<T> and ConcurrentQueue<T>. Then in the following post we’ll discuss the ConcurrentDictionary<T> and ConcurrentBag<T>. Finally, we shall close on the third post with a discussion of the...

Posted On Thursday, February 10, 2011 7:30 PM | Feedback (2) | Filed Under [ My Blog C# Software .NET ]

C#/.NET Fundamentals: Returning an Immutable Collection
Last week we discussed returning immutable POCOs from an enclosing class so that you can prevent someone who asks for your class’s data to mutate it out from under you. Now we’re going to get a little more complex and talk about returning immutable collections from an enclosing class for the same reasons. I will discuss several different methods for returning collections in a read-only fashion with their pros and cons, including performance implications. The Problem Many times you will create a type...

Posted On Thursday, November 04, 2010 7:04 PM | Feedback (6) | Filed Under [ My Blog C# Software .NET ]

C#: The Curious ConcurrentDictionary
Update: I revised some of my initial thoughts after taking bit of my own advice and thinking about the less-tangible benefits of a ConcurrentDictionary. This leads me to believe that ay time you use a Dictionary in a read/write manner in a multi-threaded environment, you should use ConcurrentDictionary instead for the simplicity and safety. It's easier to read and more maintainable, and even if you are write-heavy, it's not orders-of-magnitude slower so I think it's worth it for the safety and maintainability...

Posted On Wednesday, June 09, 2010 5:45 PM | Feedback (19) | Filed Under [ My Blog C# Software .NET ]

Powered by: