using System.Reflection; ///~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /// <summary> /// Return the version of a dll. /// </summary> /// The dll name. /// <returns> The version. </returns> ///~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public static string GetDllVersion(string dllName) { string version = "Non connu"; try { Assembly a = Assembly.LoadFrom(dllName); version = a.GetName().Version.ToString(); } catch(Exception) {} return version; }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question