Horje
relative path c# Code Example
relative path c#
var outPutDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly(). CodeBase);
var iconPath = Path.Combine(outPutDirectory, "Folder\\Img.jpg");
string icon_path = new Uri(iconPath ).LocalPath;
how to get relative path in c#
Uri file = new Uri(@"c:\foo\bar\blop\blap.txt");
// Must end in a slash to indicate folder
Uri folder = new Uri(@"c:\foo\bar\");
string relativePath = 
Uri.UnescapeDataString(
    folder.MakeRelativeUri(file)
        .ToString()
        .Replace('/', Path.DirectorySeparatorChar)
    );




Csharp

Related
2d list c# Code Example 2d list c# Code Example
c# get application root path directory Code Example c# get application root path directory Code Example
length of a string c# Code Example length of a string c# Code Example
how to remove white spaces from string in c# Code Example how to remove white spaces from string in c# Code Example
instantiate a player in photon Code Example instantiate a player in photon Code Example

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