How to

get assembly attributes

Published: 15. February 2012 | Updated: 15. February 2012
License: Microsoft Public License (MS-PL)
Categories: Framework » Attributes, Framework » Reflection
Tags: Attributes C# Reflection
Was this snippet helpful for you? YESYES / NONO

Import namespaces

using System;
using System.Reflection;

Code

Assembly assembly = Assembly.GetExecutingAssembly();
object[] attibutes = assembly.GetCustomAttributes(true);

foreach (object attribute in attibutes)
{
    Console.WriteLine(attribute);
}
Send us feedback about this snippet »



Related Snippets: