using System.Collections.Generic;
var s = "file:///Application/Index/?n=5&k=6&h=hello";
Console.WriteLine("AbsoluteUri: '{0}'", uri.AbsoluteUri);
Console.WriteLine("AbsolutePath: '{0}'", uri.AbsolutePath);
Console.WriteLine("Query: '{0}'", uri.Query);
var query = String.Empty;
if (uri.Query.Length > 0)
query = uri.Query.Remove(0, 1);
var dict = new Dictionary<string, string>();
foreach (var q in query.Split('&'))
dict.Add(pair[0], pair[1]);
foreach (var item in dict)
Console.WriteLine("Key: {0}, Value: {1}", item.Key, item.Value);
var collection = HttpUtility.ParseQueryString(s);
Console.WriteLine("'{0}'", collection.Get("n"));