Created
November 1, 2017 02:03
-
-
Save cidrugHug8/4b6934d434f31958f3b94c5afa5d07b2 to your computer and use it in GitHub Desktop.
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 Version() | |
{ | |
var x86Folderpath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); | |
const string exeRelativepath = @"SDL\SDL Trados Studio\Studio4\SDLTradosStudio.exe"; | |
var exeFullpath = Path.Combine(x86Folderpath, exeRelativepath); | |
var assembly = Assembly.LoadFrom(exeFullpath); | |
var resourceManager = new ResourceManager("Sdl.TranslationStudio.Application.StringResources", assembly); | |
var version = string.Format(resourceManager.GetString("Version"), | |
$"- {FileVersionInfo.GetVersionInfo(exeFullpath).FileVersion}"); | |
return version; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment