Error!
Success!

An Elegant Way to Implement ReadOnlyDictionary<TKey, TValue> in C#

0
kicks

An Elegant Way to Implement ReadOnlyDictionary&lt;TKey, TValue&gt; in C#  (Unpublished)

While working on creating an application framework for a personal project, I needed a way to expose a Dictionary&lt;TKey, TValue&gt; object from one of my methods. The only caveat being, I wanted the Dictionary object to be read-only. I knew that there exists a ReadOnlyCollection&lt;T&gt; in the FCL, but to my dismay there is no built-n way of creating a read-only Dictionary in .NET.


Kicked By:
Drop Kicked By: