/// <summary> /// Helper for Dictionary Deserialization /// </summary> /// <param name="inDic">The serialized Dictionary</param> /// <returns>The Dictionary</returns> public static SortedDictionary <string, string> DeserializeSortedDictionary(string inDic) { SortedDictionary <string, string> dic = new SortedDictionary <string, string>(); if (string.IsNullOrEmpty(inDic)) { return(dic); } List <string> stringSplit = TypesHelper.StringSplit(inDic, "|DicItem|", false, true); foreach (string stringItem in stringSplit) { List <string> itemSplit = TypesHelper.StringSplit(stringItem, ":DicValue:", false, false); if (itemSplit.Count == 2) { dic.Add(itemSplit[0], itemSplit[1]); } } return(dic); }