public static UriBuilder AddPathSegment(this UriBuilder baseUri, string pathToAdd) { var retval = new UriBuilder(baseUri.Uri); retval.Path = PathUtils.AddPathSegment(retval.Path, pathToAdd); return(retval); }