I have a web page where I display the versions of dlls which are deployed in our different environments -- how do I get the version/build # in c# for the telerik web.ui dll.
Thanks,
Todd.
2 Answers, 1 is accepted
0
Lini
Telerik team
answered on 08 Jan 2010, 07:34 AM
Hello Todd,
Here is some sample code you can use to get the current Telerik version:
System.Version ver = typeof(Telerik.Web.UI.RadMenu).Assembly.GetName().Version;
stringverString = ver.ToString(4);
//verString contains for example "2009.3.1208.35"
The code assumes that the Telerik.Web.UI assembly is loaded in the current web application. If it is not, then you can use the Assembly.Load() or Assembly.LoadFile() methods from System.Reflection to load it and then get the version in the same manner as above using Assembly.GetName().Version.