So here's the problem ,you want to store items in a Dictionary *but* you want to be able to access those items using different types of key (so in the example below, I use Guids, strings and longs)...here's how I usually do this...as usual any comments or suggestions for better ways are appreciated...
using System;
using System.Collections;
Â
namespace Configuration
{
   /// <summary>
   /// Summary description for ContentPageDictionary.
   /// </summary>
   public class ContentPageDictionary : DictionaryBase
   {
      private Hashtable cpKeys = new Hashtable();
      private Hashtable cpLongKeys = new Hashtable();
      public new void Clear()
      {
         this.Dictionary.Clear();
         cpKeys.Clear();
         cpLongKeys.Clear();
      }
      public ContentPage this[string key]
      {
         get
         {
            return (ContentPage)base.Dictionary[key];
         }
         set
         {
            Dictionary.Add(key, value);
            cpKeys.Add(value.Guid, key);
            cpLongKeys.Add(value.ObjectId, key);
         }
      }
Â
      public ContentPage this[long key]
         {
      get
         {
         if(cpLongKeys.Contains(key))
         return this[cpLongKeys[key] as string];
         return null;
      }
   }
      public ContentPage this[Guid key]
      {
         get
         {
            if(cpKeys.Contains(key))
               return this[cpKeys[key] as string];
            return null;
         }
      }
         public ICollection Keys
      {
         get { return (Dictionary.Keys); }
      }
Â
      public ICollection Values
      {
         get { return (Dictionary.Values); }
      }
Â
      public void Add(string key, ContentPage value)
      {
         Dictionary.Add(key, value);
      }
Â
      public bool Contains(string key)
      {
         return (Dictionary.Contains(key));
      }
Â
      public void Remove(string key)
      {
         Dictionary.Remove(key);
      }
Â
      protected override void OnInsert(Object key, Object value)
      {
         if (key.GetType() != typeof (string))
            throw new ArgumentException("key must be of type string.", "key");
Â
         if (value.GetType() != typeof (ContentPage))
            throw new ArgumentException("value must be of type ContentPage.", "value");
      }
Â
      protected override void OnRemove(Object key, Object value)
      {
         if (key.GetType() != typeof (string))
            throw new ArgumentException("key must be of type string.", "key");
      }
Â
      protected override void OnSet(Object key, Object oldValue, Object newValue)
      {
         if (key.GetType() != typeof (string))
            throw new ArgumentException("key must be of type string.", "key");
Â
         if (oldValue.GetType() != typeof (ContentPage))
            throw new ArgumentException("value must be of type ContentPage.", "oldValue");
         if (newValue.GetType() != typeof (ContentPage))
            throw new ArgumentException("value must be of type ContentPage.", "newValue");
      }
Â
      protected override void OnValidate(Object key, Object value)
      {
         if (key.GetType() != typeof (string))
            throw new ArgumentException("key must be of type string.", "key");
Â
         if (value.GetType() != typeof (ContentPage))
            throw new ArgumentException("value must be of type ContentPage.", "value");
      }
Â
   }
}