Posts

Showing posts with the label LookUp(TKeys

A New Approach To .NET Key Value pairs in Collections

A new approach has been evolved in the Collections ,i.e The LookUp is one the Class in the Collection which represents a collection of keys each mapped to one or more values. We are very familiar with the Dictonary Collection which maps only one value per key mapping.But when we come across to map the keys with more values.Then we have this LookUp Where TKey    ----> The types of the keys in the LookUp TValue ---->    The type of the elements of each IEnumerable value in the LookUp . I have worked out on this concept to understand the LookUp class. Before going in deeply , let's create a Custom Class like this Employee. cs using System.Collections.Generic; /// /// Summary description for Employee /// public class Employee {      public int ID { get; set; }      public string Email { get; set; }      public int Age { get; set; }   ...