#regionAssembly Property Accessors Public stringAssemblytitle {Get { Object[] attributes = assembly.getexecutingassembly (). GetCustomAttributes (typeof(AssemblyTitleAttribute),false); if(Attributes. Length >0) {AssemblyTitleAttribute Titleattribute= (AssemblyTitleAttribute) attributes[0]; if(Titleattribute.title! ="") { returnTitleattribute.title; } } returnSystem.IO.Path.GetFileNameWithoutExtension (assembly.getexecutingassembly (). CodeBase); } } Public stringAssemblyVersion {Get { returnassembly.getexecutingassembly (). GetName (). Version.tostring (); } } Public stringassemblydescription {Get { Object[] attributes = assembly.getexecutingassembly (). GetCustomAttributes (typeof(AssemblyDescriptionAttribute),false); if(Attributes. Length = =0) { return ""; } return((AssemblyDescriptionAttribute) attributes[0]). Description; } } Public stringassemblyproduct {Get { Object[] attributes = assembly.getexecutingassembly (). GetCustomAttributes (typeof(AssemblyProductAttribute),false); if(Attributes. Length = =0) { return ""; } return((AssemblyProductAttribute) attributes[0]). Product; } } Public stringAssemblycopyright {Get { Object[] attributes = assembly.getexecutingassembly (). GetCustomAttributes (typeof(AssemblyCopyrightAttribute),false); if(Attributes. Length = =0) { return ""; } return((AssemblyCopyrightAttribute) attributes[0]). Copyright; } } Public stringAssemblycompany {Get { Object[] attributes = assembly.getexecutingassembly (). GetCustomAttributes (typeof(AssemblyCompanyAttribute),false); if(Attributes. Length = =0) { return ""; } return((AssemblyCompanyAttribute) attributes[0]). Company; } } #endregion
Assembly Property Accessors