In System.Reflection namespace are assembly attribute classes. Here is a sample for one of those. You can try the same with the other attributes you want to read.
Assembly executingAssembly=Assembly.GetExecutingAssembly();
AssemblyCopyrightAttribute copyright=AssemblyCopyrightAttribute.GetCustomAttribute(executingAssembly,typeof(AssemblyCopyrightAttribute)) as AssemblyCopyrightAttribute; System.Console.WriteLine(copyright.Copyright);
Custom attributes defined on the assembly can be read using the same way.
Friday, May 27, 2005
Reading attributes of an assembly in .NET
Posted by Goksel Misirli at Friday, May 27, 2005
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment