Re: Programatically getting my AssemblyVersion

Tech-Archive recommends: Speed Up your PC by fixing your registry



string appName = Assembly.GetAssembly(this.GetType()).Location;
AssemblyName assemblyName = AssemblyName.GetAssemblyName(appName);
return assemblyName.Version.ToString();

Or just

return this.GetType().Assembly.GetName().Version.ToString();


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
.



Relevant Pages

  • Re: COM Object Class Library Threading model
    ... should happily enter the MTA. ... Mattias Sjögren [C# MVP] mattias @ mvps.org ... Please reply only to the newsgroup. ...
    (microsoft.public.dotnet.framework.interop)
  • Re: ASCIIEncoding.GetString returns different values
    ... For random binary data, you should consider using Base64 encoding ... Mattias Sjögren [C# MVP] mattias @ mvps.org ... Please reply only to the newsgroup. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: one line struct initialization
    ... Well maybe you can get by with an implicit conversion operator ... Mattias Sjögren [C# MVP] mattias @ mvps.org ... Please reply only to the newsgroup. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Can someone explain this issue with nullable(of DateTime)...
    ... both Date arguments are flaged saying that: ... Mattias Sjögren [C# MVP] mattias @ mvps.org ... Please reply only to the newsgroup. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Windows Native Calls
    ... A call to a native (i.e. not managed code) function provided by for ... Mattias Sjögren [C# MVP] mattias @ mvps.org ... Please reply only to the newsgroup. ...
    (microsoft.public.dotnet.languages.vb)