public void ObjectDictionary() { var dic = new StringKeyDictionaryObject { { "int", 1 }, { "bool", true }, { "date", DateTime.Now }, { "null", null } }; dic.GetItem("int"); dic.Get <bool>("bool"); dic.Get <DateTime>("int"); }
public void ObjectOnlyDictionary() { object intObj = 1; object boolObj = true; object dateObj = DateTime.Now; object?nullObj = null; var dic = new StringKeyDictionaryObject { { "int", intObj }, { "bool", boolObj }, { "date", dateObj }, { "null", nullObj } }; dic.GetItem("int"); dic.Get <bool>("bool"); dic.Get <DateTime>("int"); }