Created
November 9, 2010 07:20
-
-
Save prabirshrestha/668811 to your computer and use it in GitHub Desktop.
GetPathRelativeToExecutable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string GetPathRelativeToExecutable(string fileName) | |
{ | |
string executable = new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath; | |
return System.IO.Path.GetFullPath(System.IO.Path.Combine(System.IO.Path.GetDirectoryName(executable), fileName)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment