C# Dictionary Tutorial

A Dictionary is a public class we can use to represent a collection of keys and values.

It's a collection of KeyValuePairs.

It'a generic type:

Dictionary<TKey,TValue>

that resides in the System.Collections.Generic:

namespace System.Collections.Generic

Normally Collections that aren't generic do reside in the System.Collections while generic ones reside in the System.Collections.Generic namespace.

Both of these assemblies reside in the mscorlib.dll assembly.

A Dictionary can actually be serialized. Serialiazation is the process of the converting in memory objects into a bytestream.

That stream can then saved or even sent over the network then deserialized back into memory as an object again.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *