AssemblyProduct

  • Thread starter Thread starter Guest
  • Start date Start date
I have this code which works but it seems like a lot of effort to get some
text values. Is this the correct way?

Assembly thisAsm = this.GetType().Assembly;
object[] attrs =
thisAsm.GetCustomAttributes(typeof(AssemblyTitleAttribute), false);
string test1 = ((AssemblyTitleAttribute)attrs[0]).Title;

object[] attrs1 =
thisAsm.GetCustomAttributes(typeof(AssemblyCompanyAttribute), false);
string test2 = ((AssemblyCompanyAttribute)attrs1[0]).Company;
 
Back
Top