Horje
c# url relative path remove Code Example
c# url relative path remove
var uri = new Uri(myString);

var noLastSegment = string.Format("{0}://{1}", uri.Scheme, uri.Authority);

for(int i = 0; i < uri.Segments.Length - 1; i++)
{
   noLastSegment += uri.Segments[i];
}

noLastSegment = noLastSegment.Trim("/".ToCharArray()); // remove trailing `/`




Csharp

Related
unity repeat coroutine Code Example unity repeat coroutine Code Example
{} is this used for code blocks in c# Code Example {} is this used for code blocks in c# Code Example
same click method lots of buttons c# Code Example same click method lots of buttons c# Code Example
How to keep line breaks in SQL Server using ASP.NET and C#? Code Example How to keep line breaks in SQL Server using ASP.NET and C#? Code Example
commandline to open outlook minimized Code Example commandline to open outlook minimized Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12