public static string JoinUrl(string baseUrl, params string[] parts) { var partList = new List<string>(); partList.Add(baseUrl.TrimEnd('/')); foreach (string part in parts) { if (!String.IsNullOrEmpty(part)) partList.Add(part.TrimStart('/')); } return String.Join("/", partList); }
106800cookie-checkC# JoinUrl / CombineUrl