Assembly info Attributes

Hi,

I am looking at accessing the attributes that you can set in the AssembyInfo file

( I am attempting to do Soup to Nuts lab 5 using Visual J# )

there is code written in VB and C# to access these events, 

the closest I can come up with, with the help of Instant J# converter is:

Assembly asbly = Assembly.GetExecutingAssembly();
System.Object[] attrs = asbly.GetCustomAttributes(
true);

System.Collections.IEnumerator e1 = attrs.GetEnumerator();

while
(e1.MoveNext())
{
   Attribute att = (Attribute)(e1.get_Current());
   if (att instanceof AssemblyCompanyAttribute)
   {
      lblCompany.set_Text(((AssemblyCompanyAttribute)att).get_Company());
   }
   else if (att instanceof AssemblyCopyrightAttribute)
   {
      lblCopyright.set_Text(((AssemblyCopyrightAttribute)att).get_Copyright());
   }


the problem is with the type "Attribute" attached to att  -  compiler does not like it   -  is there a way to get at this collection of attributes and to determine what
kind of attributes they are as the above code is attempting to do

thanks



Answer this question

Assembly info Attributes

  • yyll

    Once again   -  never mind about the above post  -  I needed a

    Import Systems.*    -  now Attribute type is recognized

    many apologies

  • Assembly info Attributes