views:

21

answers:

1

I've got a macro that I need to be able to get the "Company Name" from the project assembly. Can anybody tell me how I can reference the assembly to get the "Company"?

A: 
  AssemblyCompanyAttribute[] attributes = (AssemblyCompanyAttribute[])Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), true);

   if (attributes.Length > 0)
   {
       string company = attributes[0].Company;
   }

You should be able to modify that to get the company name

StressChicken
I get an "index was outside of the array" error with this.
rockinthesixstring