January 10, 2008
The following code snippet return the Version number of currently executing assembly -
static string GetCurrentAssemblyVersionNumber()
{
Assembly currentAssembly = Assembly.GetExecutingAssembly();
return currentAssembly.FullName.Split( new Char [] {','} )[1];
}
No Comments » |
.Net, C# | Tagged: Assembly, C# |
Permalink
Posted by adiil
December 17, 2007
Sometimes it becomes necessary to find out the folder where the current executing assembly is running. Using following code snippet, you can get it very easily –
string currentAssemblyDirectoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
2 Comments |
.Net, C# | Tagged: .Net, Assembly |
Permalink
Posted by adiil