private string RemoveTrailingSlash(string url) { if (url[url.Length - 1].Equals('/')) url = url.Remove(url.Length - 1); return url; }