C# Dictionary: Definition, Examples, Best Practices, and Pitfalls
So far we’ve had the opportunity to take a deep C# dive on arrays, lists, and the very valuable enum. Today we are going to stay in the System.Collections.Generic namespace and learn about a structure that’s designed for lookups?the C# dictionary.
In this post, we’ll take a look at what the dictionary is, exactly.? Form there, we’ll cover everything you need to know about it, including how to use it and what its methods are.? And, throughout describing these things, we’ll use examples, highlight best practices, and caution you about pitfalls along the way.