Advertisement
FrayxRulez

Untitled

Mar 18th, 2015
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. private Dictionary<string, string> ParseUrlArguments(string args)
  2. {
  3. Dictionary<string, string> strs = new Dictionary<string, string>();
  4. if (!string.IsNullOrEmpty(args))
  5. {
  6. char[] chrArray = new char[] { '&' };
  7. string[] strArrays = args.Split(chrArray);
  8. for (int i = 0; i < (int)strArrays.Length; i++)
  9. {
  10. string str = strArrays[i];
  11. chrArray = new char[] { '=' };
  12. string[] strArrays1 = str.Split(chrArray);
  13. if ((int)strArrays1.Length > 0)
  14. {
  15. strs.Add(strArrays1[0], ((int)strArrays1.Length > 1 ? strArrays1[1] : string.Empty));
  16. }
  17. }
  18. }
  19. return strs;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement