Thanks
-------------------------------------------
Roy Chastain
KMSystems, Inc.
>I would like to be able to retrieve the values of several of the
>AssemblyXXXAttribute classes. How do I get to them at runtime?
Many of them you get with Assembly.GetCustomAttributes. For example
Assembly thisAsm = this.GetType().Assembly;
object[] attrs = thisAsm.GetCustomAttributes(
typeof(AssemblyTitleAttribute), false ) );
if ( attrs.Length == 1 )
Console.WriteLine( ((AssemblyTitleAttribute)attrs[0]).Title );
But AssemblyVersionAttribute becomes part of the assembly name, which
you retrieve with Assembly.GetName instead.
Console.WriteLine( thisAsm.GetName().Version );
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.