lundi 22 juin 2020

Get Folder Information through Reflection in c# [duplicate]

#Get current Assembly information through Reflection.

protected static string GetCurrentFolder()
{
    string codeBase = Assembly.GetExecutingAssembly().CodeBase;
    UriBuilder uri = new UriBuilder(codeBase);
    string path = Uri.UnescapeDataString(uri.Path);
    return Path.GetDirectoryName(path);
}  




Aucun commentaire:

Enregistrer un commentaire