private static Dictionary<string, string> ParseToDictionary(string str)
        {
            Dictionary<string, string> result = new Dictionary<string, string>();

            var pairs = str.Split('&');
            foreach (var p in pairs)
            {
                var items = p.Split('=');
                if (items.Length == 2)
                {
                    result.Add(items[0], items[1]);
                }
                else
                    continue;
            }

            return result;
        }

 

相关文章:

  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
  • 2021-06-28
  • 2021-10-29
猜你喜欢
  • 2021-11-20
  • 2021-05-20
  • 2021-07-11
  • 2022-12-23
  • 2021-10-04
  • 2021-12-06
相关资源
相似解决方案