Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft DotNet
Microsoft C# .NET
Accessing assembly attributes?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Joe Delekto, post: 4084194"] Greets, There are several *Attribute classes for the attributes that can be applied to the assembly. I used the following sample code to extract the title from the current executing assembly: public string GetAppTitle() { foreach (object attr in Assembly.GetExecutingAssembly().GetCustomAttributes(false)) { AssemblyTitleAttribute aTitle=attr as AssemblyTitleAttribute; if (aTitle != null) { return aTitle.Title; } } return ""; } You can use the 'is' keyword to also determine if one of the attributes is the particular attribute for which you are searching. Regards, Joe [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft DotNet
Microsoft C# .NET
Accessing assembly attributes?
Top