Find Attribytes from assembly name : Assembly « Development Class « C# / C Sharp

C# / C Sharp
1. 2D Graphics
2. Collections Data Structure
3. Components
4. Database ADO.net
5. Development Class
6. Event
7. File Stream
8. GUI Windows Form
9. Language Basics
10. Network
11. Office
12. Regular Expressions
13. Services Event
14. Thread
15. Web Services
16. Windows
17. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
C# / C Sharp » Development Class » AssemblyScreenshots 
Find Attribytes from assembly name
Find Attribytes from assembly name


using System;
using System.Reflection;

public class FindAttributes {
  static void Main(string[] args) {
      String assemblyName = "test.exe" ;
      try
      {
        Assembly  a = Assembly.LoadFrom assemblyName ;

        object[]  attributes = a.GetCustomAttributestrue ;

        if attributes.Length > ) {
          Console.WriteLine "Assembly attributes for '{0}'..." , assemblyName ;

          foreach object o in attributes )
            Console.WriteLine "  {0}" , o.ToString ( ) ) ;
        }
        else{
          Console.WriteLine "Assembly {0} contains no Attributes." , assemblyName ;
        
      catch Exception ex ) {
        Console.WriteLine ex.ToString ( ) ) ;
      }
  }

}
           
       
Related examples in the same category
1. Create assemblyCreate assembly
2. Examining Location InformationExamining Location Information
3. Working with an Assembly Entry PointWorking with an Assembly Entry Point
4. Loading Assemblies Dynamically with Load() and LoadWithPartialName()Loading Assemblies Dynamically with Load() and LoadWithPartialName()
5. Finding and Creating Assembly Types
6. Retrieving a List of Referenced Assemblies
7. Simple Windows Form Application with Version InformationSimple Windows Form Application with Version Information
8. Get current application domainGet current application domain
9. List All Types from an AssemblyList All Types from an Assembly
10. List All Members from an AssemblyList All Members from an Assembly
11. Use Assembly to indicate the version and cultureUse Assembly to indicate the version and culture
w_w__w.__j___a___v_a___2_s_.___c__om___ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.